blueimp/jQuery-File-Upload — Issue #765: File uploaded in a folder depending on the file name and extension
Author: user179282
Created: 2011-11-07 09:52:39+00:00
State: open

I would kindly ask all of you if you could help me. I'm working in zend framework and I need to adjust my code so, when a user
drops the file in the browser(before the actual upload), the file name and extension is checked in a sense if it already exists. Depending on the existence of the ifle, an
icon right by the trash icon will appear (green tick if fresh upload, no other file with the same name. Red cross if there is a file).
But to address a matter that is more important to me, and that is for me to set up the code in a manner so when uploading depending on the file name and file extension, the file is being uploaded in a specific folder. So e.g. an X.png, gets into a "png" folder - subfolder "X", and Y.pdf gets into a "pdf" folder - subfolder "Y"

Here is my code do far...
This is the upload.php (acting as a model)
http://pastebin.com/PVSMDhDM

This is the application.js
http://pastebin.com/14nGHPXR

This is the jquery.fileupload-ui.js.
http://pastebin.com/RmJvgS2N

This is the index.phtml
http://pastebin.com/5Brwz0xX

This is the layout of the index.phtml
http://pastebin.com/gEVtxBaf

If anyone is willing to help, I would be very very grateful, I know it a lot of work, I'm a noob and I need all the help I can get.
Thank you in advance!