I have a Drupal commerce site, and the product allows a user to upload a file. The file is attached to a line item type. Currently they are presented with a Browse button which is fine, but I would like to give them the ability to drag and drop a file into the upload area as well. Similar in functionality to Gmail or imgur.com.

The field type has to stay as a standard Drupal File field, since we do some post upload processing to the file.

I have unsuccessfully played with thee media module, and a few others. The problem I have them so far is that they are either a different field type, or there isn't a way to limit the drag and drop upload to a single file. We only allow one file to be attached.

It has surprised me that this isn't easier to do. I will send $50 via PayPal to whomever can tell me how to do this. If really needed, I can get you access to our dev site, but I would rather have directions on how to set it up myself.

Please ask me for any more information you may need.

Comments

duckzland’s picture

http://drupal.org/sandbox/vingborg/1138512 supports drag and drop, not 100% sure if it can limit file upload, but you can always edit plupload js to limit the number of file can be uploaded.

--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com

iwant2fly’s picture

This sounds good. I can install the module, enable it, and then set the widget type as mupload, but dragging and dropping doesn't appear to work. Really nothing seems to have changed. I also do not see any configuration pages for Plupload of Mupload within Drupal. The status report is showing the plupload library as installed. Is there something I need to do to enable the drag and drop functionality?

duckzland’s picture

I believe a patch to plupload module is needed, but not 100% sure as of today. coz its been months since I last installed the module.

Anyway did pluplod upload tables shown in your page (as shown here http://www.plupload.com/example_queuewidget.php) ?

--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com

iwant2fly’s picture

Yeah I looked at the patch that was mentioned in plupload, but as far as I could tell that was incorporated into the release a version or two back. I will look at it a little closer later. To answer you question no I did not see an upload table like the one in the link.

duckzland’s picture

did you get the js and put them in the directory as plupload module suggested?

--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com

alforddm’s picture

So far it seems to work flawlessly. What are the chances of this becoming a regular module?

rudiedirkx’s picture

What about https://drupal.org/project/dragdropfile? Uses actual XHR2 upload.