[Plugin] Improved attachments upload

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Improved attachments upload
« on March 20th, 2012, 11:10 AM »Last edited on March 31st, 2012, 02:09 PM
A quick little plugin, this takes advantage of modern browser's ability to upload via XHR(AJAX). Features :

- Supports multiple selection, drag and drop into attachments area
- Shows progress of the current upload
- Supports client side validation of attachments including file size

Note that these features will only work on modern browsers with support of XHR upload, for older browsers it will resort back to default behavior.

Thanks :)

 Screen Shot 2012-03-31 at 5.32.28 PM.png - 23.41 kB, 423x157, viewed 382 times.

 Screen Shot 2012-03-31 at 5.36.13 PM.png - 39.14 kB, 908x286, viewed 455 times.

 Screen Shot 2012-03-31 at 5.31.05 PM.png - 62.85 kB, 930x358, viewed 312 times.

 Screen Shot 2012-03-31 at 5.32.20 PM.png - 133.41 kB, 964x385, viewed 331 times.

The way it's meant to be

MultiformeIngegno

  • Posts: 1,337

Antes

  • Stuff?
  • Posts: 52
Re: Improved attachments upload
« Reply #2, on March 21st, 2012, 09:42 AM »
Agree. It could be good if it in core with (Not working? Try simple uploader) -mode-

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Improved attachments upload
« Reply #3, on March 21st, 2012, 10:47 AM »
As I understand it, it would need to be rewritten again to work with the attachment uploader currently in Wedge (which, you'll notice, is not the same one SMF has)
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: Improved attachments upload
« Reply #4, on March 21st, 2012, 02:21 PM »
Quote from Arantor on March 21st, 2012, 10:47 AM
As I understand it, it would need to be rewritten again to work with the attachment uploader currently in Wedge (which, you'll notice, is not the same one SMF has)
The uploaders are fairly similar(This one is mostly based on the current one in Wedge) but I had to overwrite the current JS events to better fit the bill. But yeah, it will require some working to make use of the current Wedge functions. I find it better as a plugin anyway. Not everything should be in core by default :P
Posted: March 21st, 2012, 02:20 PM
Quote from Antes on March 21st, 2012, 09:42 AM
Agree. It could be good if it in core with (Not working? Try simple uploader) -mode-
In all honesty, "Not working? Try..." type things are the worst. It should not be left for the user to decide what to do. Why tease them with a feature which will not work. eh?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Improved attachments upload
« Reply #5, on March 21st, 2012, 02:24 PM »
I don't really have a problem with this being core, if someone wants to rewrite it (because I don't), but it doesn't bother me if we don't either, as I'm happy enough with the current attachments stuff, current bug with it notwithstanding.[1]
 1. It sometimes pushes things in reverse order. Eh, I'd deal with it in due course.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Improved attachments upload
« Reply #6, on March 30th, 2012, 07:26 PM »
I had a fairly good idea for this plugin that I forgot. Damn I need to take more notes.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278

Nao

  • Dadman with a boy
  • Posts: 16,079

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Improved attachments upload
« Reply #9, on March 31st, 2012, 01:18 AM »
I have no objections to it being core if someone wants to do the work necessary to integrate it with what we have, handle limits and so on. It's just not something I've been too concerned about; the core has something better than what SMF had, and it is more usable (even if it has one side bug) but this would make it awesome. I just don't have the brain power to implement it myself right now.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Improved attachments upload
« Reply #10, on March 31st, 2012, 09:00 AM »
Thanks :), I'd rather have it as a plugin now(Even if it becomes an official one), because I don't see it being much prettier(code wise) even if integrated into core itself. Plus I'm too lazy to do that ATM :P, although I'll try to take a look at it in a while.
[Plugin] Re: Improved attachments upload
« Reply #11, on March 31st, 2012, 02:10 PM »
Now supports client side validation and I improved the drag and drop area.

Updated first post with screenshots.

MultiformeIngegno

  • Posts: 1,337

godboko71

  • Fence accomplished!
  • Hello
  • Posts: 361
[Plugin] Re: Improved attachments upload
« Reply #13, on April 1st, 2012, 10:29 PM »
Sexy plugin. Could leave it as plugin and include it later in core if its popular.
Thank you,
Boko

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278