Page 1 of 1

file upload widget - upload response

Posted: Wed Sep 28, 2011 10:32 pm
by amc
The file upload widget has an upload response bound to it in the demo program. In the demo example it returns the number of files, the upload directory & an array of file names (2).

What else can be returned in this structure ?

I need to MIME types & the files sizes for each uploaded file. Is it possible to get those back via the upload response ?

I see they are being passed to the exit program, but ideally i need them in the upload response data structure.

Re: file upload widget - upload response

Posted: Wed Oct 05, 2011 9:49 am
by David
These are not available in the response property. I would suggest looking at the file extensions.

Re: file upload widget - upload response

Posted: Thu Oct 06, 2011 8:45 am
by amc
ouch... you've really reduced the usefulness of the upload widget if you're not going to provide the mime file type & the upload size back with the response data structure. I don't understand that, you get them at upload time to pass to the exit pogram, but then drop them before returning the response ds.

guess I have to go back to my cgi uploader

Re: file upload widget - upload response

Posted: Mon Oct 17, 2011 10:36 am
by David
The MIME types of the files are known only to the upload processing code on the backend. This runs in a separate job from the application itself. So, the types cannot be passed along to the application.

The exit program is called from the file upload processing, so the types are known at that time.