Php Upload File Server Side

  

Php upload file server side includes

Server Side PHP Reference SQL Reference. PHP File Open/Read PHP File Create/Write PHP File Upload PHP Cookies PHP Sessions PHP Filters PHP. The is_uploaded_file. Server Side PHP Reference SQL Reference Python Reference ASP Reference. With PHP, it is easy to upload files to the server. The file upload will not work.

Active11 months ago

So I'm struggling a bit to find what I'm looking for and how to implement it.

I have a basic PHP file uploader working, in that a user presses a custom upload button, selects a file and then using JS, it checks for a change (Ie. the user selecting a file) and then submits the form which uploads the image fine.

What I also want now is a drag & drop to upload area. So the user can drag an image from their file explorer and drop it in a designated place (not the whole page) and then once that image has been dropped for the form to submit automatically with their image and use the same PHP processing.

Is this possible and realistic?

TenatiousTenatiousLimit
5842 gold badges8 silver badges30 bronze badges

1 Answer

This is absolutely realistic and possible without using any third parties plugin.

The following snippets should give you an idea of how it could work:

Drop area

the processFileUpload()-Method:

form example

Feel free to use something like this as a starting point. The browser support of this you can find here http://caniuse.com/#feat=xhr2

Of course you can add any extras you wish like progress bar, preview, animation...

Dwayne
2,4962 gold badges24 silver badges41 bronze badges
wildhaberwildhaber
Php Upload File Server Side
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

Php Upload File Server Side Scripting

Not the answer you're looking for? Browse other questions tagged phpjqueryhtml5uploaddrag-and-drop or ask your own question.