You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usage scenario: a user is allowed to upload mulitple files to a File Upload question. When a user uploads an invalid file, we send the options.callback('error', 'Error message') function to notify the user about an invalid file uploading attempt. However, if the user uploads multiple files - some of them valid, and others are invalid, it is impossible to simultaneously send valid files using options.callback('success', validFiles) and inform users about an invalid file uploading attempt using the options.callback('error').
The text was updated successfully, but these errors were encountered:
@tsv2013, a customer also requests to have an option to specify multiple errors within the options.callback function.
Say that I try to upload at once two invalid files 'a.exe' and 'b.txt' I want to display this error :
Uploading 'a.exe' failed. reason : Type not allowed.
Uploading 'b.txt' failed. Reason : Empty file.
I believe that it would work if it would be possible to exdend an API and adding an option to specify an array or errors as a first parameter.
const errors = [
'Uploading 'a.exe' failed. reason : Type not allowed.',
'Uploading 'b.txt' failed. Reason : Empty file._'
];
const validFiles = [
//.. An array of valid files
]
options.callback(errors, validFiles);
…y an error message in case of invalid files at the same time (#7326)
* Resolved#7314 - File Upload - Allow uploading valid files and display an error message in case of invalid files at the same time
* Work for #7314 - File Upload - Allow uploading valid files and display an error message in case of invalid files at the same time - fixed f-test
* Work for#7314 - File Upload - Allow uploading valid files and display an error message in case of invalid files at the same time - Changed API
* Update options.callback description
* Fixed#7314 - File Upload - Allow uploading valid files and display an error message in case of invalid files at the same time - Updated error message text
---------
Co-authored-by: tsv2013 <[email protected]>
Co-authored-by: RomanTsukanov <[email protected]>
User Issue: T15217 - Add error message on the file preview
https://surveyjs.answerdesk.io/internal/ticket/details/T15217
Usage scenario: a user is allowed to upload mulitple files to a File Upload question. When a user uploads an invalid file, we send the
options.callback('error', 'Error message')
function to notify the user about an invalid file uploading attempt. However, if the user uploads multiple files - some of them valid, and others are invalid, it is impossible to simultaneously send valid files usingoptions.callback('success', validFiles)
and inform users about an invalid file uploading attempt using theoptions.callback('error')
.The text was updated successfully, but these errors were encountered: