DragDropMultiUpload-Talk

Summary: Talk page for DragDropMultiUpload.
Maintainer: Petko
Users: +14 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Absolute ref for Attach link

DDMU is a great repice that provide a more user friendly page edition. But the "Attach:file.ext" link doesn't allow to include page in a different group without breaking the attachment reference ( this is a normal and logical behaviour of pmwiki ). In this case, the "Attach:" link need an absolute reference like : "Attach:Group.PageName/file.ext".

To do that we need to change the lines 108 to 109 of the pub/ddmu/ddmu.js file (diff command out):

108,109c108,109
<       if(f.indexOf(' ')<0) {insMarkup('', '', 'Attach:'+f);}
<       else insMarkup('', '', '[[Attach:'+f+']]');
---
>       if(f.indexOf(' ')<0) {insMarkup('', '', 'Attach:{$FullName}/'+f);}
>       else insMarkup('', '', '[[Attach:{$FullName}/'+f+']]');

Would be cool if this will become the default behaviour of ddmu.

Antony Templier May 13, 2013, at 03:47 PM


Smaller drop target

Some browsers (I use Chrome) allow drag+drop onto file controls. I use this a lot when I want PmWiki to rename the file after upload, but with DDMU I can't do that any more. Can you make the drop target smaller, like the one you get in GMail, or just put the form control above it in the z-order? It looks like the form element could be raised and look reasonable, if confusing for users on other browsers...

Alternative idea: if it's an upload page, and there's a filename, and a single file is dropped, ask the user if they want to rename after upload (and then maybe just submit the form normally, no AJAXiness).

Maxim? August 25, 2011, at 11:12 PM

Thanks for the idea. Today's version lets you set the filelist as a drop zone instead of the whole page. I like both ways. To enable the drop zone only for the uploads page, use the following code in config.php. ---Petko August 25, 2011, at 10:48 PM

  if ($action == "upload") $DDMUEnableDropzone = 1;

Colors

The colours in ddmu.css don't work very well on dark backgrounds (mine is #069). I'm not sure what would be the best approach - setting the background-color would make it readable but ugly, and overriding it in my own skin CSS would be tricky as the specifiers are rather long and subject to change. This is not the first recipe I've had this problem with...

#069

red green orange

Black

red green orange

Pathological case

red green orange

This might work...

red green orange

Maxim? August 26, 2011, at 06:26 AM

I agree. Maybe the least bad solution is to inherit the site colors. Add to config.php such a line:

  $HTMLStylesFmt['myddmu'] = "#DDMU a {color: inherit !important;}\n";

The filenames will thus be the same color as your other text in the page, and can still be differentiated by their styles (normal, italic, strike-trough) and the icons (unfortunately on white background). --Petko August 26, 2011, at 07:15 AM


No Joy on IE8

I have not been able to get this to work on Internet Explorer 8. When I drop the jpg file on the target, the browser simply opens the image file. Or am I missing something? Has anyone had similar luck? I dont have another browser to try at the moment. BruceK? Sept 5, 2011, at 03:12 PM

IE10 is finally supported. Previous versions of IE didn't work because they didn't have the required functions. --Petko July 24, 2012, at 10:23 PM

On a Windows system, you can get the free Firefox or Google Chrome browsers. It might work in IE with the Chrome frame plug-in, but you may need to add to config.php such a line:

  if($action=='edit' || $action == 'upload')
    $HTMLHeaderFmt['chromeframe'] = '<meta http-equiv="X-UA-Compatible" content="chrome=1"/>';

If you test it, please report if it works. --Petko September 05, 2011, at 11:52 PM


Not working on FF 8?

I've tested it with Firefox 8.0.1 on GNU/L and it's not showing any kind of message while trying to upload on the edit page. However, Chromium 15.0.87... works as expected. Any hint? --simkin December 06, 2011, at 04:44 PM

It looks like it works for me, just installed firefox amd64 8.0+build1-0ubuntu0.11.04.3 and tested it on the edit and upload page, both with and without a dropzone. Can you give me more information about your installation? Other JavaScript libraries may cause a conflict. --Petko December 18, 2011, at 03:01 PM

I'm not sure where is the problem. You can check our sandbox. DDMU works just fine with Chromium. On FF, the dark screen with the down arrow is shown, but nothing happens when mouse click is released. Opera doesn't seems to work at all. --simkin December 19, 2011, at 09:29 AM

Looks like mine is the only FF not working, from other computers it works ok. I'll try to reinstall or change my FF version and report. --simkin December 19, 2011, at 01:43 PM

I was able to upload a file to your sandbox without a problem. Could this be some browser extension/proxy issue? --Petko December 20, 2011, at 04:13 AM

Finally I found out the issue is related with the desktop file browser itself. I'm using Thunar as my regular file browser and dropping from it works on chromium but not on firefox. If I use Nautilus instead, dropping works for both browsers. So, in the end, it turned out the issue was not related with DDMU. Thanks. --simkin December 22, 2011, at 05:54 PM


Recent changes loss?

I've had a lot of cases of truncating my Site/AllRecentChanges, $Group/RecentChanges and $Group/RecentUploads which seem to be very aligned to using this to upload multiple images at the same time. I suspect it must be a bug in the PmWiki core upload functionality, possibly related to enabling $RecentUploadsFmt ? Maxim? March 13, 2012, at 02:08 PM

Thanks for the report, it is likely a problem when multiple instances of PmWiki read and edit the RecentUploads pages at the same millisecond. I'll investigate it although I'm not quite sure it is fixable. --Petko March 14, 2012, at 04:53 AM

The new version released today can have a "queue mode" where the files are uploaded one after another and not in parallel. To enable it, add to config.php the line $DDMUEnableQueue = 1; This should be just a little slower but safer for the RecentUploads pages. --Petko July 24, 2012, at 07:31 PM


Custom Attach: link

Is it possible to customise the insertion Attach link, eg I would like to insert (:thumb "file.jpg" :) instead. Thanks simon August 18, 2012, at 05:10 AM

Not at the moment. This would require major changes of the recipe if you want custom insertions for selected file extensions. --Petko


Drop zone directive

The recipe really rocks. I'm using it on a club website and it makes it so much easier for people.

We use a page that has a small dialogue to attach files directly. Is it possible to have a directive that would insert a file drop zone in the dialogue? (see example)

simon September 30, 2012, at 09:27 PM

Yes, I was thinking that too often I'd like to drop a file on a page without having to go into edit or upload mode, so I'll think of something. (Not this week.) --Petko October 01, 2012, at 05:59 AM

This feature was added in the latest version. --Petko August 14, 2017, at 08:55 AM


Replaces existing files of the same name

If you drag and drop a file, and a file of the same name already exists, the uploaded file replaces the previous file. (actually I'd prefer an option to turn this behaviour off)

simon November 25, 2012, at 03:05 AM

This is a PmWiki option, not DDMU. See $EnableUploadOverwrite. --Petko November 25, 2012, at 07:59 AM


Still beta?

Hi Petko, that's a great recipe!

I wonder why it's still marked "beta" - do you see any risk using it?

OliverBetz 2012-12-27

No, there are no known problems or risks. But I feel it is not yet extensively tested, and I have some ideas for improvements (unfortunately not too easy to do). It should be about as bad as my other recipes. --Petko December 26, 2012, at 12:36 PM


File sizes larger than 50000 bytes

HI! Thanks for the recipe! I'd like to know if I can add things like powerpoint presentations using this recipe. The files are larger than the 50000 byte limit, so I'd either have to change the limit (which I haven't figured out how to do), or refer to another recipe. Can you please advise me?

This is a PmWiki setting, not a DDMU one. See UploadsAdmin about the variable $UploadMaxSize. --Petko March 08, 2013, at 11:46 AM


I have

  $UploadMaxSize = 10000000; ## bytes 10MB 
  $UploadExtSize['jpeg'] = 10000000; #  limit .jpeg files to 10MB 
  $UploadExtSize['jpg'] = 10000000; #  limit .jpg files to 10MB 

but I get file too large error for files > 4MB. What settings/variables controls the maximum file size for this recipe?

thanks, simon April 30, 2013, at 05:02 AM

The recipe doesn't set filesize limits, it uses the limits set for the upload function in PmWiki. If you can upload larger files with ?action=upload, I'll look into it - it may be possible that your browser doesn't see the correct filesize (if that's the case I don't know how could I fix it). If you cannot upload larger files with ?action=upload, see SystemLimits. --Petko April 30, 2013, at 07:38 AM


Not working on Snow Leopard Safari (5.1.10)

I thought there was something wrong with the recipe, but it works fine in Chrome. My Safari is the latest available for my OS (5.1.10). Xes? December 23, 2013, at 12:22 PM


Wondering if there is a unicode problem? simon February 15, 2014, at 11:32 PM

Probably: modern browsers are unicode, and the files on your operating system have unicode names; if your wiki doesn't have UTF-8 enabled, and if you drop files with international characters, and if you have changed $UploadNameChars, the default filename characters allowed by PmWiki, chances are that you'll see some problems. --Petko February 16, 2014, at 03:39 AM

Talk page for the DragDropMultiUpload recipe (users).