Project

General

Profile

Feature #3141

dropzone implementation

Added by yvan vander sanden over 8 years ago. Updated over 6 years ago.

Status:
InProgress
Priority:
Normal
Assignee:
Target version:
-
Start date:
05/15/2014
Due date:
% Done:

0%

Estimated time:

Description

I'd like to see dropzone support added, as used by most modern web applications. As an example this link: http://www.dropzonejs.com/ (I'm not affiliated with this project, but I can hardly just add a link to facebook or google :-)


Files

uploader.tgz (5.67 KB) uploader.tgz 2 source files, 2 header files for drop upload Daniel McRobb, 05/04/2015 04:10 PM
#1

Updated by Daniel McRobb over 7 years ago

I attached what I'm using for drag and drop uploads. It's not generic since it's deep inside my gallery software, but hopefully it provides enough information for whatever the Wt team would like to do.

My DropUpload class inherits from WLabel, mostly because it made it easy for me to get the styling behavior I wanted. The UploadResource class will look familiar.

Only works with javascript. Barebones, the client-side code would be quite simple. Only really need the drop handler that appends to FormData and sends using XHR. The server side is not significantly different than what's done in WFileUpload.

There's some extra stuff in the code for handling drop type uri-list. I need that for my use cases, but all it does is send the URIs to the server. Could just be removed.

Delete or modify the Syslog stuff. I didn't include the code for that since it's in my own separate C library. And all of my servers are FreeBSD so I haven't checked portability.

#2

Updated by Koen Deforche over 7 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
#3

Updated by Rene A over 6 years ago

Would you mind providing us with the JavaScript, js file as well as the css.

Thanks

Also available in: Atom PDF