SmartClient Version: v12.1p_2022-02-22/Enterprise Development Only (built 2022-02-22)
Chrome 98.0.4758.102 on MacOS Monterey 12.2
Hello, please modify the mediaLibrary.ds.xml like this:
then open the upload sample:
- select a file to upload (a file which you can modify easily)
- click "Save" and get the upload error
- modify the file
- click save, again
you'll see that the request fails, and you can't do nothing (until the timeout expires).
In real use cases this happens when a user upload an excel/csv file, gets an error because the excel format is wrong, and so he opens the file, modifies and saves it.
It would be nice that the framework could detect the problem, so we may at least warn the user.
Chrome 98.0.4758.102 on MacOS Monterey 12.2
Hello, please modify the mediaLibrary.ds.xml like this:
Code:
<DataSource ID="mediaLibrary" serverType="sql" tableName="mediaLibrary"> <fields> <field name="pk" type="sequence" hidden="true" primaryKey="true"/> <field name="title"> </field> <field name="image" type="imageFile" maxFileSize="5242880" required="true"> </field> </fields> <operationBindings> <operationBinding operationType="add"> <script language="groovy"> return new DSResponse().setFailure("ERROR") </script> </operationBinding> </operationBindings> </DataSource>
- select a file to upload (a file which you can modify easily)
- click "Save" and get the upload error
- modify the file
- click save, again
you'll see that the request fails, and you can't do nothing (until the timeout expires).
In real use cases this happens when a user upload an excel/csv file, gets an error because the excel format is wrong, and so he opens the file, modifies and saves it.
It would be nice that the framework could detect the problem, so we may at least warn the user.
Comment