File Upload still works when form validation fails
Last Post 01-24-2011 12:59 PM by Chad Nash. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
bcorngtrUser is Offline
wading in the water
wading in the water
Posts:18
Avatar

--
01-14-2011 11:12 AM
    Hi,

    I have a DF module with a File Attachment / Upload question on it.  I have added a Validation SQL Query via the Module Configuration settings.  This works as expected.  The issue is that when this validation results in a failure (the form data is NOT saved), the file is still uploaded.  I would have expected the file uploaded to be treated as part of a transaction, meaning that if the underlying data was not updated, the file would not be uploaded either.  I could also create a DNN scheduled event to look for any "orphaned files" and purge these occassionally, but I wanted to see if there was a more immediate way to address this situation.

    Thanks!
    Brian
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    01-18-2011 01:39 PM
    Hello Brian,

    I haven't ran into this situation before, but I will look into this to see that this issue can be duplicated and then take further action from there.

    It may take some time to follow up, but rest assured that I will contact you through this thread in the near future.

    If you have any questions please let me know.

    Thanks,

    Ryan
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    01-24-2011 12:59 PM
    Hi Brian - Yes, unfortunately these files have to get uploaded within a certain order and that order covers data to viewstate (and the file upload happens then) before the SQL Validation happens. This doesn't mean that NO validation happens, only SQL validation happens because you need access to those $(Fields) stored in viewstate for you to properly use SQL validation. I realize this is confusing but basically this is the way the module works because otherwise you would never be able to even use the $(FileUpload) token to perform a SQL validation against.

    This doesn't mean that no validation takes place, for example there is a maximum file size and also 'allowable extensions' that are checked before uploading a file. So if you are using those areas of validation the file should not be uploaded.


    Thanks,

    Chad



    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi