Jump to content

Open file (like Save As)


Tadas

Recommended Posts

Hello,

I want to do, when someone click on button/link will open this:

saveas.jpg

but not Save As, but Open. I know how to make simple form:

<html>
<body>
<form action="edit.php" method="post" enctype="multipart/form-data">
<label for="file">File:</label>
<input type="file" name="file" id="file" />
<br><br>
<input type="submit" name="submit" value="Open"/>
</form>
</body>
</html> 

But here You must click Browse, but I want to do like in photo: if You click on button, then at once will open form like photo.

Many thanks,

Tadas :)

P.S. Sorry for my really bad English.

Link to comment
Share on other sites

I do not understand what you are wanting. It sounds like you want to customize the file download box. You have no control over this.  This is entirely controlled by the browser that the download is taking place in.  There might be a technique I am not aware of, but as far as I know there isn't.

Link to comment
Share on other sites

this function is probably the closest option to what you are looking for: http://www.php.net/manual/en/function.header.php

 

header allows you to change what happens when calling data. For instance; When you click a link to an image or pdf it usually will open directly in the browser, but with header(); you can have it open a save file dialogue instead.

 

Unfortunately, like businessman stated, there is no way to customize a save file dialogue. It is possible to design your own completely from scratch, but that would involve multiple client and server side technologies. AKA, pain in the butt

 

Hope this helped.

 

E

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.