533
Views
5
Comments
Solved
Verify the data type of a binary file

Hello, 

I have a system where i have to import a file.

But i only can accept the following formats: "rar; .zip; .doc; .docx; .docm; .xls; .xlsx; .xlsm; .pdf; .txt; .csv; .xml" and i am not find the solution for this requirement. Someone can help me? 

I already see the "accept" property for the widget but i am not able to managed that

2024-01-18 12-42-28
Bogdan Boglea
Solution

Hey Pedro,


Take a look at this post: https://www.outsystems.com/forums/discussion/64918/upload-widget-file-type-validation/

The file's mime type can be checked on client-side.


Regards,

Bogdan

UserImage.jpg
Pedro Ricarte

I didn't see the mime types. Thank you, it was very helpful

2024-01-18 12-42-28
Bogdan Boglea

You're welcome, glad you could solve the issue :)

2024-03-22 09-17-23
Chandra Vikas Sharma

Hi ,

 you can use below forge component for getting file format and apply validation accordingly

 https://www.outsystems.com/forge/component-overview/11735/file-size-type-extension-client-side


Thanks

CV Sharma  



UserImage.jpg
Pedro Ricarte

That was another solution that i test on my personal environment, but in this case, i am not able to use extensions from forge. But it is a valid solution for others

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.