[Plugin] Improved attachments upload

Dragooon

  • I can code! Really!
  • Talking Head
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,723
[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 291 times.)

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

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

 Screen Shot 2012-03-31 at 5.32.20 PM.png (133.41 kB, 964x385 - viewed 240 times.)
The way it's meant to be

MultiformeIngegno

  • Talking Head
  • I'm pretty sure someone already mentioned this, anyway: on Chrome when I mouseover on thoughts (in home page), the div starts flickering.. it's strange
  • Posts: 1,123
Re: Improved attachments upload
« Reply #1 on March 21st, 2012, 09:07 AM »
Why don't have this in core (with a fallback to older browsers)? :)

Antes

  • We-Gen
  • Any chance to get converter? I want to install wedge on next sub-domain and get serious about it.
  • Posts: 50
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

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,600
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.


Dragooon

  • I can code! Really!
  • Talking Head
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,723
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?
The way it's meant to be

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,600
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.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Dragooon

  • I can code! Really!
  • Talking Head
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,723
[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.
The way it's meant to be

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,600
[Plugin] Re: Improved attachments upload
« Reply #7 on March 30th, 2012, 07:30 PM »
I know that feeling. I've forgotten a good many ideas that way.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • With a Box
  • If you say so.....
  • Posts: 12,894
[Plugin] Re: Improved attachments upload
« Reply #8 on March 31st, 2012, 01:12 AM »
I vote for core. With all my heart.
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,600
[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.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Dragooon

  • I can code! Really!
  • Talking Head
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,723
[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.
The way it's meant to be

Dragooon

  • I can code! Really!
  • Talking Head
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,723
[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.
The way it's meant to be

MultiformeIngegno

  • Talking Head
  • I'm pretty sure someone already mentioned this, anyway: on Chrome when I mouseover on thoughts (in home page), the div starts flickering.. it's strange
  • Posts: 1,123
[Plugin] Re: Improved attachments upload
« Reply #12 on March 31st, 2012, 03:53 PM »
Nice indeed! :cool: :cool:

godboko71

  • What is that smell?
  • We-Gen
  • Weaving works on ipad again yippie! Should have checked more often I bet.
  • Posts: 286
[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,
Robert Town Jr aka Godboko

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,600
[Plugin] Re: Improved attachments upload
« Reply #14 on April 1st, 2012, 10:30 PM »
We can indeed do that too :)
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.