File Dropper Extension

0
Hi, I am using file dropper from app store. I want to upload only .txt file in that file Dropper. can anyone give any suggestions. i know how to do with file manager but in this new widget i have no  idea.    
asked
2 answers
0

Hi Shaan,

The best way to do this is by using a non-persistent verification entity. This can be configured within the ‘Verification before upload’ tab in the file dropper widget settings. On upload, the file dropper widget will create a verification object, set the file extension in the chosen extension attribute and will call a microflow/nanoflow in which you can verify whether the file may be uploaded or not. I recommend to use a nanoflow for this, which simply checks if the file extension is ‘txt'. The nanoflow needs to return a string as result. If the string is "" or empty, the file will be uploaded. If the string contains text, this will be used as an error message.

For further information, see the documentation in the widget settings, the set-up is well explained there:

Hope this helps!

answered
0

Hi Shaan,

One thing you can do is in the ‘Restrictions’ tab, accept only text/plain as mime type. 

As you can see here:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types

 

The other solution is do a check in the OnAcceptMicroflow as stated in the answer above.

answered