When "inp_edit_swfupload" block is used on form, then selected files are actually uploaded in two cases:
- when "upload" button is pressed (under uploader control)
- when "save" button is pressed (on top of form)
By default SWFUploader uploads files in temp directory ("/system/tmp") and when saving record to database ("save" button pressed) is moving uploaded files from temp directory to actual directory, specified in unit config.
But, when we have some invalid data on form, like required field value is not entered and "save" button is pressed, then we are returned to form with validation errors displayed, but are already uploaded to target directory.
Files, uploaded to temp directory should only be moved to target directory when "save" button is pressed and there are not validation errors on form.
This also happens, when we do ajax-based form validation (that has flash uploader on it) using FormManager JS class.