AJAX image upload possible jquery with preview

SoftwareSavant picture SoftwareSavant · Sep 18, 2011 · Viewed 8k times · Source

I am trying to find some sort of plug-in for Ajax upload with a file preview. The image will be saved into a MySQL dataBase. Is that even possible? I guess all things are possible with certain requirements. Have you guys ever come across anything like that?

Answer

Tomas picture Tomas · Sep 18, 2011

Let me tackle your question one bit at a time:

I am trying to find some sort of plug-in for Ajax upload...

BAM!

...with a file preview.

Yep, from the page above, although I might wonder why this is necessary and if it isn't remove it (I believe minimalist design is usually better) and go with fancy upload which seems to be more popular (sorry, I don't have much experience with ajax uploaders)

The image will be saved into a MySQL dataBase. Is that even possible?

Unfortunately, it is; you will have to use the blob data type (alternate tutorial). Personally though I would just create a directory and save the images there, because then you don't have to query MySQL every f***ing time you want to display the image (I would feel bad for hat server). In which case I suggest you use class.upload.php (I have good experiences with it), in conjunction with whatever ajax uploader you chose to use.

I guess all things are possible with certain requirements. Have you guys ever come across anything like that?

...yes