HTML5 multi-file upload plugin HTML5 multi-file upload plugin
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

HTML5 multi-file upload plugin

Started by ron4mac, January 25, 2013, 01:23:10 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

ron4mac

Here is my attempt at putting together an alternative file upload method using HTML5 and javascript.  Features are: concurrent multi-file upload with drag-and-drop and progress indicators. 'Chunked' uploading makes it possible to upload files larger than server limitations. User groups can be configured to allow larger (or smaller) uploads than the global CPG setting.

Comments and suggestions welcome.

Internet Explorer compatibility seems to be only with version 10+.

Those who find issues ... please indicate platform/OS and browser when posting.

PLEASE NOTE: This plugin is included as a core part of CPG 1.6

Jeff Bailey

#1
Thank you for your contribution.

I haven't had the chance to install it yet but I looked through the code and it looks great, I did notice an empty style.css though.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

ron4mac

Yep ... newbie here.  Haven't yet found the way to get a CSS link in the head.  It's just a place holder 'till then.  Or ... perhaps inline <style> serves the purpose here.  Will be resolved by v1.0.

Thanks.

Jeff Bailey

Quote from: ron4mac on January 25, 2013, 01:36:50 AM
Haven't yet found the way to get a CSS link in the head.  It's just a place holder 'till then.
http://documentation.coppermine-gallery.net/en/dev_plugin_hooks.htm#plugin_hooks_filename_page_meta
I've never needed to add a style sheet but you could try page_meta.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Αndré


Αndré

Your plugin looks really amazing. I suggest to change some parts of the language file tough.

Find
$lang_plugin_html5upload['html5_method'] = 'HTML5 multi-file upload';
and replace with
$lang_plugin_html5upload['html5_method'] = 'Multiple files - HTML5-driven';
(to match the description of the flash uploader)


The second row overwrites the first one:
$lang_plugin_html5upload['html5upload'] = 'Upload file(s) using HTML5 methods';
$lang_plugin_html5upload['html5upload'] = 'HTML5 Upload';



In codebase.php, I suggest to find
cpg_db_query("INSERT INTO {$CONFIG['TABLE_CONFIG']} (name, value) VALUES ('html5upload_autoedit', '1')");
and replace with
cpg_db_query("INSERT INTO {$CONFIG['TABLE_CONFIG']} (name, value) VALUES ('html5upload_autoedit', '0')");
so that option isn't enabled by default. It again matches the behavior of the flash uploader and if there are any error messages you're able to read them (I just tried to upload some unsupported file types, saw the red boxes for a very short time and was then redirected to the empty edit files page).

ron4mac

Thanks for the suggestions, André.  I assume that I would submit v1.0 in this thread ... correct?

Αndré

Yes. I added you to the contributor group, so you're able to edit your posts. Please attach any new version to the initial post (as far as I know you can add 3 attachments per post as contributor).

phill104

ron4mac,

It would be great if you could add a list of currently supported browsers to your original post. I'm quite suprised to find IE9 and IE10 currently do not work.

I really love this plugin, brilliant job.
It is a mistake to think you can solve any major problems just with potatoes.

ron4mac

Quote from: Phill Luckhurst on January 29, 2013, 08:34:45 PM
ron4mac,

It would be great if you could add a list of currently supported browsers to your original post. I'm quite suprised to find IE9 and IE10 currently do not work.

I really love this plugin, brilliant job.

Thanks, Phill.

I don't have a lot of resources to test it out.  I developed on Mac OS with Safari, Chrome and Firefox.  I might be able to put together a VirtualBox IE setup to explore getting it to work there (if at all possible).

Thanks for your feedback.

ron4mac

#10
Quote from: Phill Luckhurst on January 29, 2013, 08:34:45 PM
I'm quite suprised to find IE9 and IE10 currently do not work.

Phill,

I put together a VirtualBox and tried IE9 and, indeed, it doesn't look like it will function correctly.  But I installed a fresh version of IE10 and had no real problems uploading files with the plugin.  I did make a few changes to my development version of the javascript that were only for minification purposes and should not have affected anything logical.  But just in case, I'll upload a new version (as 1.0.1) to match what I'm using.

Αndré

Do we really need the minified JS library if it makes trouble? It saves just 2,6 KB and if you keep in mind that somebody wants to upload something to the gallery, those few KB are just a drop in the bucket.

jeeveser

Hi,
I installed this and I'm getting :

Critical error
There was an error while processing a database query

Anyone know why?

Αndré

Please enable debug mode and post the extended error message.

electrop

Small addition : french language file
(rename file as french.php befor putting it into /lang directory)

For a full translation, in codebase.php, replace line 97 with :
<td class="tableb">{$lang_plugin_html5upload['files']}</td>
and add line
<td class="tableb">{$lang_plugin_html5upload['files']}</td>
in your language file.

electrop

Sorry  :-[

Add line
$lang_plugin_html5upload['files'] = 'Fichiers';
into your language file

ron4mac

#16
Quote from: electrop on April 22, 2013, 10:19:18 PM
Small addition : french language file
(rename file as french.php befor putting it into /lang directory)

Could you please provide a translation for:
$lang_plugin_html5upload['autoedit'] = 'Automatically go to edit after error-free upload completes';

[ and French translations for English in the configuration file would be nice, too ... full I18N ]

Then I will add the updated version with full French language.

Merci de votre aide.

electrop

My proposal for the last string  :
$lang_plugin_html5upload['autoedit']='Aller automatiquement à l\'édition à la fin d\'une séquence d\'envoi sans erreurs';

ron4mac

Quote from: electrop on May 06, 2013, 03:53:32 PM
My proposal for the last string  :
$lang_plugin_html5upload['autoedit']='Aller automatiquement à l\'édition à la fin d\'une séquence d\'envoi sans erreurs';

Thanks, Electrop.  See new version (1.1) in original post.

tassu

Stupid question: How to use it?

Installed plugin. There`s no readme file.