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
https://forums.phpfreaks.com/topic/226128-open-file-like-save-as/
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.

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.