Advanced search  

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

Pages: [1] 2 3 4 5   Go Down

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

0 Members and 2 Guests are viewing this topic.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
HTML5 multi-file upload plugin
« on: January 25, 2013, 01: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. '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
« Last Edit: August 25, 2016, 03:50:16 am by ron4mac »
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: HTML5 multi-file upload plugin
« Reply #1 on: January 25, 2013, 01: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, 01: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

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: HTML5 multi-file upload plugin
« Reply #2 on: January 25, 2013, 01: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: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: HTML5 multi-file upload plugin
« Reply #3 on: January 25, 2013, 01: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: 15764
Re: HTML5 multi-file upload plugin
« Reply #4 on: January 25, 2013, 10: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: 15764
Re: HTML5 multi-file upload plugin
« Reply #5 on: January 25, 2013, 10: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

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: HTML5 multi-file upload plugin
« Reply #6 on: January 25, 2013, 01: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: 15764
Re: HTML5 multi-file upload plugin
« Reply #7 on: January 25, 2013, 01: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

phill104

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

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Re: HTML5 multi-file upload plugin
« Reply #9 on: January 29, 2013, 09: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

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Re: HTML5 multi-file upload plugin
« Reply #10 on: January 30, 2013, 04: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, 05:18:31 am by ron4mac »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: HTML5 multi-file upload plugin
« Reply #11 on: January 30, 2013, 09: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: 22
Re: HTML5 multi-file upload plugin
« Reply #12 on: February 05, 2013, 03: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: 15764
Re: HTML5 multi-file upload plugin
« Reply #13 on: February 05, 2013, 11:20:46 am »

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

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
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

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
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 5   Go Up
 

Page created in 0.034 seconds with 19 queries.