[RFC] Multiple file uploads

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Multiple file uploads

Post by callumacrae » Mon Mar 26, 2012 8:55 pm

Suggestion!

This is beautiful: http://valums.com/ajax-upload/
Made by developers, for developers!
My blog

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Multiple file uploads

Post by Oleg » Mon Mar 26, 2012 9:03 pm

Is there a standards-compliant (html5?) solution that works in all modern browsers?

_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Multiple file uploads

Post by _hsr » Mon Mar 26, 2012 9:27 pm

Oleg wrote:Is there a standards-compliant (html5?) solution that works in all modern browsers?
Yes, there are many other methods for multipart uploads, but plupload seems to be the best at it as of now.

Update :

The server end of plupload is to be written in upload.php containing a class with functions for file upload and attaching it to the post, which would preserve the current mechanism and also follow the security guidelines.
There is a text here !

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Multiple file uploads

Post by Oleg » Tue Mar 27, 2012 5:19 am

So then we don't need any of flash/silverlight/whatever bits at all, and can just go with html5 exclusively?

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Multiple file uploads

Post by callumacrae » Tue Mar 27, 2012 5:39 am

Oleg wrote:Is there a standards-compliant (html5?) solution that works in all modern browsers?
No, except for input type="file"
Made by developers, for developers!
My blog

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Multiple file uploads

Post by brunoais » Tue Mar 27, 2012 12:28 pm

Oleg wrote:So then we don't need any of flash/silverlight/whatever bits at all, and can just go with html5 exclusively?
Yes. There's that option in it's code. I checked it.

_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Multiple file uploads

Post by _hsr » Wed Mar 28, 2012 8:07 am

Update:

todo:
Check permissions before uploading files
Use existing functions to update attachment_table
Use phpbb defined fileExt blacklist
There is a text here !

harderthanfire
Registered User
Posts: 1
Joined: Sat Mar 24, 2012 3:36 pm

Re: [RFC] Multiple file uploads

Post by harderthanfire » Wed Mar 28, 2012 7:54 pm

I am also hoping to do this idea for Google Summer of Code but I have a slightly different proposal.

Instead of using any kind of external code like Plupload we could get the same functionality using some XMLHttpRequest2 magic, a dash of css for the progress bar (html5 has a nice new progress tag just for this) and adding multiple="multiple" to the upload form. This has the benefit like Plupload of degrading gracefully in IE8 and older browsers and working fine in all modern browsers without the need for the extra external code. It would mean writing the javascript from scratch but it will not take much and will simply augment the existing attachment uploads process for people using modern browsers.

User avatar
AliasM2K
Registered User
Posts: 82
Joined: Tue Mar 27, 2012 2:33 am

Re: [RFC] Multiple file uploads

Post by AliasM2K » Thu Mar 29, 2012 2:41 am

Oleg wrote:Is there a standards-compliant (html5?) solution that works in all modern browsers?
Well, HTML 5 Boilerplate http://html5boilerplate.com/ boasts about being able to support HTML5 tags on all modern browsers. Maybe we should first implement it on phpBB, and then workout the upload problem.

Personally, I like HTML 5 Boilerplate. It is a good template with support for mobile devices as well.

_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Multiple file uploads

Post by _hsr » Thu Mar 29, 2012 2:13 pm

This is just a work in progress, I've managed to embed plupload into the upload attachments tab, however it currently lacks styling.
The current setup is not checking of user permissions, which I am currently working on. In the file list, when we click on a file, a new field for comments/pace inline. However, I am thinking of making a slide down animation, once the file is uploaded, to resemble the old "POSTED ATTACHMENTS" section. The 100% can be modified into progress bars, which I need comments on how to imply. My suggestion would be using html5 canvas, however it might not reflect well in IE8, if then the usual table-fill or div-fill should suffice.

The number of attachments per post can also be set via both JavaScript and PHP end, which would be fetched from the phpbb config. Currently, it checks for permitted fileExts and file size at both ends. Please add any other features you'd like to see. Regarding file deletion, an ajax post request should do the job.

I've attached some images representing the process, though it is pretty basic.
Attachments
Capture4.png
Upload complete
Capture4.png (7.63 KiB) Viewed 7358 times
Capture3.png
Files added to the upload queue
Capture3.png (8 KiB) Viewed 7358 times
Capture2.png
Multiple files selected
Capture2.png (67.87 KiB) Viewed 7358 times
There is a text here !

Post Reply