Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

What is the best file/photo uploader for my web application?

51mon (566265) writes | about a year and a half ago

Apache 3

51mon writes "I work on a web application, we have a Java file/Image uploader. It is very like the one Facebook had, it has issues very like the Facebook photo uploader had. The biggest issue is it requires Java Runtime, and I've disabled Java in my browser to save Firefox the trouble of doing it every 5 minutes, so I can't act surprised if our users don't have it or want it. Also the Java detection isn't very good, Java detection is harder than it should be.

I'd like an uploader that; uploads regulars files, will scale images down client side (JPEG, GIF, PNG), can upload and resize a bunch of photos in one go with some sort of progress indicator. Free software (as in freedom) preferred. If it spots a mobile browser or phone and does something plausible that would be brilliant. Needs to work in current browsers (that includes IE8 still — no really some people still use it), but otherwise latest stable Chrome, and Firefox (We have no issue with telling people to upgrade their browser if a newer version would work better AND is available for their platform). Drag and drop highly desirable but if it opens the appropriate (native) multi file select dialog box then we can survive without drag and drop.

Best candidate so far is "plupload" — doesn't appear to have a switch for setting upload resizing client side — but that looks fixable as long as all the images in one upload are the same size, which is probably acceptable for our purposes. "plupload" can fall back to all sorts of exotic backends, but that is fine, as long as if I have a modern browser it "works" without them. Fall back to something for IE8/IE9/IE10(?) is almost mandatory. We already fall back to a simple HTML form when the users despair of Java or we don't detect Java.

I've looked at: Uploadify (no resize of images), SWF-Uploader (dying), GWT-Uploader (seems to be revamped SWF-Uploader), Silverlight File Uploader (obvious issue here), ThinFile Upload (Java and demo died), Agile-Uploader (seems to lack love), FineUploader (No image resize), and some other less notable uploaders.

Can /. reader tell me if I've missed one worth examining. Or should I look to browser plugs and mobile Apps."

cancel ×


Sorry! There are no comments related to the filter you selected.

Good luck. (1)

Jane Q. Public (1010737) | about a year and a half ago | (#43225695)

Good luck finding a program that will reliably resize images client side and then upload.

But while it is understandable that you want to keep the load on your server as light as possible, there is already good server-side code that does this quickly and reliably. In fact, if you have a Linux server, it probably already has ImageMagick installed.

It is very easy to create a server-side app in Ruby, for example, that will take an upload, resize it to one or more custom, named sizes (including various thumbnails if you like), and store it on the hard drive in a way that is accessible via a database. (To be clear, the IMAGE is not stored in the database, just the information needed to retrieve it. That is generally much more efficient.)

There is a plugin (actually a "gem" code library) for Ruby called Paperclip that can be set up to do this automatically, using the installed copy of ImageMagick for the graphics grunt work.

But as for trying to do it client-side, as I say: good luck. I don't know of any code that does quite what you want. Not well and reliably, anyway.

To tell if ImageMagick is installed on your server, get to the command line on your server, and enter "convert" without the quotes. If you get a page full of stuff back with an ImageMagick copyright notice saying ImageMagick at the top, you are good to go.

There is also an (ugh!) PHP tool called Magic Wand that works with ImageMagick, if you insist on going old-school.

imagecopyresampled (1)

crutchy (1949900) | about a year and a half ago | (#43232021)

you just need a client side language with an implementation of php gd's "imagecopyresampled" function

gd is open source, so it might be possible to implement it with a html5 canvas, but efficiency would take a hit

start with []

i would argue that if you can't program a web client with a combination of html4.01/5, css2.1/3 and javascript, you're doing it wrong

Re:imagecopyresampled (1)

crutchy (1949900) | about a year and a half ago | (#43232061)

as far as reading the file, the html5 file api is supported by chrome, which will get you a notable and increasing chunk of web users

ie and firefox will catch up soon

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>