Dragging and dropping file for upload ???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
msblue
Forum Newbie
Posts: 1
Joined: Fri Feb 27, 2004 10:34 am

Dragging and dropping file for upload ???

Post by msblue »

On a file-upload interface, instead of having to "browse" to choose the file to upload, is it possible to implement a drag-and-drop capability so that user will be able to simply drag a file from the desktop into the file upload window (or input box) ? How would i extract the file path data ? How would i prevent IE from simply opening the selected file in the browser window ? I would greatly appreciate any input !
User avatar
gangboy
Forum Newbie
Posts: 14
Joined: Tue Jan 06, 2004 11:58 am
Location: Constanţa, România

Post by gangboy »

I don't think this is possible or even if it's possible trough a weird way you won't get support for all the browsers. For sure.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

You would need the user to installe some kind of Applet or ActiveX component i would imagine.

Mark
User avatar
redhair
Forum Contributor
Posts: 300
Joined: Fri May 30, 2003 4:36 pm
Location: 53.23N-6.57E
Contact:

Post by redhair »

Or FTP via browser
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

yep a ftp browser will allow you to drag and drop for the upload

Http upload wont! for as far as i know
jollyjumper
Forum Contributor
Posts: 107
Joined: Sat Jan 25, 2003 11:03 am

Post by jollyjumper »

FTP upload would also be my best guess to go. But I don't know if this is a good sollution, as I remember that a few years ago my win98 machine didn't support FTP uploading through my browser, but I don't know if this was a win98 issue, or a internet explorer version issue.

A while ago when I was thinking about a same kind of option I was thinking about creating a unique subfolder before the upload screen was shown, and make a ftp connection to this folder through an Iframe in the upload screen. When submitting the form which contained the upload iframe, the unique folder name can be given, so you can handle the fileuploads after that.

A few issues I can remember I was struggling with were:
- how to make sure all the files are uploaded before the form has been submitted or the page has been left
- how to make sure your server doesn't get floaded with unused files/folders(I guess you can clean them through a cron job script).

I hope my thoughts bring you some ideas.

Greetz Jolly.
Post Reply