Uploading multiple files in relation to OnFileUploaded, OnUploadCompleted, etc.

  •  09-01-2011, 8:09 AM

    Uploading multiple files in relation to OnFileUploaded, OnUploadCompleted, etc.

    From the documentation, I understand that OnFileUploaded should fire after each single file upload, whereas OnUploadCompleted should fire after all selected files are uploaded.
     
    I'm using the OnFileUploaded event, because I want to handle each separate uploaded file immediately (eg. resize uploaded image). But the event turns out to fire after all files are uploaded to the temporary location, instead of after each single file.
     
    That means that when I'm uploading a selection of eg. 200 images to the server, and resizing them after upload, there are 200 original size persisted image files in the temporary directory. And that sometimes causes a 'disk full' message, while it would fit just fine on disk once they are resized.
     
    What do I need to do to be able to resize an uploaded image and get rid of its temporary persisted version, before the Uploader proceeds to uploading the next selected file?

    Regards, Marja
View Complete Thread