Is the Drag/Drop attachment feature working for anyone else on a v1.11 fresh install?

I can use the "Choose them" link fine to open a file browser. When you drag a file over the area, the area lights up, but nothing happens from there on.

No errors/warnings anywhere and the Network Inspector shows that nothing was sent to the server.

I compared the .js being loaded with my install and that on supportsystem.com (where it works) and I see they are using older versions of jquery and jquery-ui. So, I tried those versions on my system to no avail.

I hope I'm not alone on this one... ?

I've always used the choose them or image icon in the editor.
It's been buggy for a long time.

There are a couple threads over at github under issues that might have a fix

Not surprising. I was researching some of the scripts used and the last updates were 4-6 years ago. I looked at Github, but I'll widen my search.

Quick patch so you don't frustrate your users when/if File drag and drop does not work when opening a new ticket.

/include/class.forms.php

Look for this (line 4549):

            __('Drop files here or %s choose them %s'),
            '<a href="#" class="manual">', '</a>'); ?>

and replace with this:

            __('%sClick Here to Attach Files%s'),
            '<a href="#" class="manual">', '</a>'); ?>
	&nbsp;(Maximum number of files allowed: <?php echo $config['max'] ?: 20; ?>)

It will also now let them know how many files are allowed. You can configure this in Admin-->Manage-->Forms-->TicketDetails Then press Config button to right of field "Issue Details" You can also specify the types of files which are allowed.

I need to move on to another project. But, if anyone has time, from the research I've done, this looks like the best bet to replace/fix this drag/drop upload:

https://www.dropzonejs.com/

Open Source, Simple to use, small amount of code, and currently supported by the dev. Plus, his site is well designed, which is always a good sign.

You could probably gut the filedrop.field.js and replace it with this in 2-4 hours. All of the code is in /include/class.forms.php

2 months later

Very well, is working.
File scp/js/scp.js does not have a line to change, but it is not necessary either.
Thanks, @ntozier.

Write a Reply...