Advanced search  

News:

cpg1.5.30 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.28 you don't need to upgrade. If you are running an older version than cpg1.5.28, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1] 2 3 4   Go Down

Author Topic: HTML5 multi-file upload plugin  (Read 37200 times)

0 Members and 1 Guest are viewing this topic.

ron4mac

  • Dev Team member
  • Coppermine regular visitor
  • ****
  • Country: us
  • Offline Offline
  • Posts: 72
HTML5 multi-file upload plugin
« on: January 25, 2013, 02:23:10 AM »

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.

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.

v1.1 Additions:
   Added ability to stop, resume or cancel the queued files.
   Added French language (portions software translated).
 
v1.2 New features:
   Option to use file name for Title
   Allow entry of bulk Keywords and/or User Fields (optional)
   Set MIME types for client browser file filtering (optional)

v1.2.5 Improvements
   Reports more server error situations
   Added Finnish language

v1.2.6 Bug removal
   Removed bug where a theme element could conflict with album selection, causing upload failures
   Added Spanish language

v1.2.7 Update
   Corrected issue with admin config form (thank you, wilk)
   Retooled admin config code and db settings (uninstall prior versions)
   Revised French language
   Added Polish language
 
« Last Edit: March 11, 2014, 04:00:45 PM by ron4mac »
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1305
  • Fishing relaxes me.
Re: HTML5 multi-file upload plugin
« Reply #1 on: January 25, 2013, 02:30:30 AM »

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.
« Last Edit: January 25, 2013, 02:36:17 AM by Jeff Bailey »
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

ron4mac

  • Dev Team member
  • Coppermine regular visitor
  • ****
  • Country: us
  • Offline Offline
  • Posts: 72
Re: HTML5 multi-file upload plugin
« Reply #2 on: January 25, 2013, 02:36:50 AM »

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.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1305
  • Fishing relaxes me.
Re: HTML5 multi-file upload plugin
« Reply #3 on: January 25, 2013, 02:56:14 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.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 13645
Re: HTML5 multi-file upload plugin
« Reply #4 on: January 25, 2013, 11:07:23 AM »

page_meta should be fine, alternatively you could also use gallery_header (http://documentation.coppermine-gallery.net/en/dev_plugin_hooks.htm#plugin_hooks_filename_gallery_header).
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 13645
Re: HTML5 multi-file upload plugin
« Reply #5 on: January 25, 2013, 11:17:48 AM »

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

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


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


In codebase.php, I suggest to find
Code: [Select]
cpg_db_query("INSERT INTO {$CONFIG['TABLE_CONFIG']} (name, value) VALUES ('html5upload_autoedit', '1')");and replace with
Code: [Select]
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).
Logged

ron4mac

  • Dev Team member
  • Coppermine regular visitor
  • ****
  • Country: us
  • Offline Offline
  • Posts: 72
Re: HTML5 multi-file upload plugin
« Reply #6 on: January 25, 2013, 02:31:52 PM »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 13645
Re: HTML5 multi-file upload plugin
« Reply #7 on: January 25, 2013, 02:37:07 PM »

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).
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Online Online
  • Gender: Male
  • Posts: 3972
    • Windsurf.me
Re: HTML5 multi-file upload plugin
« Reply #8 on: January 29, 2013, 09: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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ron4mac

  • Dev Team member
  • Coppermine regular visitor
  • ****
  • Country: us
  • Offline Offline
  • Posts: 72
Re: Re: HTML5 multi-file upload plugin
« Reply #9 on: January 29, 2013, 10:43:25 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.
Logged

ron4mac

  • Dev Team member
  • Coppermine regular visitor
  • ****
  • Country: us
  • Offline Offline
  • Posts: 72
Re: Re: HTML5 multi-file upload plugin
« Reply #10 on: January 30, 2013, 05:51:27 AM »

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.
« Last Edit: January 30, 2013, 06:18:31 AM by ron4mac »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 13645
Re: HTML5 multi-file upload plugin
« Reply #11 on: January 30, 2013, 10:09:31 AM »

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.
Logged

jeeveser

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: HTML5 multi-file upload plugin
« Reply #12 on: February 05, 2013, 04:25:00 AM »

Hi,
I installed this and I'm getting :

Critical error
There was an error while processing a database query

Anyone know why?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 13645
Re: HTML5 multi-file upload plugin
« Reply #13 on: February 05, 2013, 12:20:46 PM »

Please enable debug mode and post the extended error message.
Logged

electrop

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: HTML5 multi-file upload plugin
« Reply #14 on: April 22, 2013, 10:19:18 PM »

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 :
Code: [Select]
<td class="tableb">{$lang_plugin_html5upload['files']}</td>and add line
Code: [Select]
<td class="tableb">{$lang_plugin_html5upload['files']}</td>in your language file.
Logged

electrop

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: HTML5 multi-file upload plugin
« Reply #15 on: April 22, 2013, 10:22:18 PM »

Sorry  :-[

Add line
Code: [Select]
$lang_plugin_html5upload['files'] = 'Fichiers';into your language file
Logged

ron4mac

  • Dev Team member
  • Coppermine regular visitor
  • ****
  • Country: us
  • Offline Offline
  • Posts: 72
Re: HTML5 multi-file upload plugin
« Reply #16 on: April 23, 2013, 01:45:50 AM »

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

Could you please provide a translation for:
Code: [Select]
$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.
« Last Edit: April 23, 2013, 10:44:12 PM by ron4mac »
Logged

electrop

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: HTML5 multi-file upload plugin
« Reply #17 on: May 06, 2013, 03:53:32 PM »

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

ron4mac

  • Dev Team member
  • Coppermine regular visitor
  • ****
  • Country: us
  • Offline Offline
  • Posts: 72
Re: HTML5 multi-file upload plugin
« Reply #18 on: May 14, 2013, 03:18:32 PM »

My proposal for the last string  :
Code: [Select]
$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.
Logged

ron4mac

  • Dev Team member
  • Coppermine regular visitor
  • ****
  • Country: us
  • Offline Offline
  • Posts: 72
Re: HTML5 multi-file upload plugin
« Reply #19 on: May 16, 2013, 04:59:24 PM »

A new, and probably final, version (1.2) of this plugin has been added to the original post.
I will update it, if needed, for any new CPG release and fix any reported bugs.

Thanks to those of you who have provided feedback.
« Last Edit: May 19, 2013, 12:52:29 AM by ron4mac »
Logged
Pages: [1] 2 3 4   Go Up
 

Page created in 0.084 seconds with 19 queries.