Hey guys,
I have noticed that I get error DBFM151 whenever I try to use:
codeuploadMultipleFilesHelper(uploadService, Apperyio('imageInput'));/code
if the file that I am trying to upload contains a space in its name. In other words, if I have an image on my desktop with file-name "my picture.jpg", and I try to upload it to the files collection, the upload service will return this error:
pre
[{"error":{"code":"DBFM151","description":"Invalid file name was used. A valid file name contains only a-zA-Z0-9%_.- characters and is between 1 and 218 characters."}}]
/pre
In order to avoid this in the future, is there a way to validate the filename PRIOR to running the "uploadMultipleFilesHelper" function, and renaming the file-name if it contains spaces?
Maybe something that checks if the filename contains spaces, and if so, replace them with an underscore to make the new filename "my_picture.jpg"?
Any help is appreciated, thank you!