Advanced search  

News:

cpg1.5.34 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.30 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2 3 4   Go Down

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

0 Members and 1 Guest are viewing this topic.

ron4mac

  • Dev Team member
  • Coppermine frequent poster
  • ****
  • Country: us
  • Offline Offline
  • Posts: 116
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.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
 
v1.3 Changes
   Plugin configuration can be set by user group
      - Groups can have further restricted file upload size
   Reworked the progress display method; which now also has an indeterminate state.
   Made some changes to (hopefully) improve upload efficiency:
      - Staggered file upload starts
      - Use of dedicated server processing script
   Added config and usage help files
   Title and Caption added to possible bulk entry items
« Last Edit: October 07, 2014, 07:32:01 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 frequent poster
  • ****
  • Country: us
  • Offline Offline
  • Posts: 116
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: 13949
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: 13949
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 frequent poster
  • ****
  • Country: us
  • Offline Offline
  • Posts: 116
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: 13949
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
  • Offline Offline
  • Gender: Male
  • Posts: 3997
    • 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 frequent poster
  • ****
  • Country: us
  • Offline Offline
  • Posts: 116
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 frequent poster
  • ****
  • Country: us
  • Offline Offline
  • Posts: 116
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: 13949
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 novice
  • *
  • Offline Offline
  • Posts: 20
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: 13949
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 frequent poster
  • ****
  • Country: us
  • Offline Offline
  • Posts: 116
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 frequent poster
  • ****
  • Country: us
  • Offline Offline
  • Posts: 116
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

tassu

  • Coppermine novice
  • *
  • Country: fi
  • Offline Offline
  • Posts: 27
    • When the light paints
Re: HTML5 multi-file upload plugin
« Reply #19 on: August 31, 2013, 12:51:08 PM »

Stupid question: How to use it?

Installed plugin. There`s no readme file.
Logged
Pages: [1] 2 3 4   Go Up
 

Page created in 0.095 seconds with 19 queries.