Hi Petar,
Thanks for getting back to me. As I mentioned, I already have validation in place for new files, that part is not the problem. Please see the following Use Case describing the current behaviour of the Upload widget:
Req: There are no documents in the upload widget
1) [User] Clicks 'Select' and chooses a document to upload
2) [Widget] Triggers a POST on the 'saveUrl' for the new document to be uploaded (it's successful)
3) [User] Clicks 'Select' again and chooses a different document to upload
4) [Widget] Triggers a POST on the 'removeUrl', effectively deleting the document because "multiple=false"
5) [Widget] Validates the new document against the specified rules and uploads is if validation passes
My problem is that step 4 is happening before step 5. The existing document is being deleted BEFORE the new one is validated.I need the widget to follow the following use case:
3) [User] Clicks 'Select' again and chooses a different document to upload
4) [Widget] Validates the new document against the specified rules
4.1) Validation passes
4.1.1) [Widget] Triggers a POST on the 'removeUrl', effectively deleting the document
4.1.1) [Widget] Triggers a POST on the 'saveUrl', uploading the new document
4.2) Validation fails
4.2.1) Alert user
I hope I've managed to convey what Im trying to do. Unfortunately I cannot Dojo it as the KendoUI demo's fail in the Dojo environment.
Thanks and Kind Regards,
Grant