restrict upload just for certain file types

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

restrict upload just for certain file types

#1

Postby t4nu » Mon Aug 22, 2016 5:49 am

Hi,
In my application I allowed user to upload file, but I want to restrict the upload just for certain file types. I have set the types and it show up as the default when the user try to upload the file, but still in the file type option there is "all files" type which if selected will show any other types available within the folder.
If I don't want the option of all files show up in the file type option, what should I do?
Thanks in advance for the help.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Mon Aug 22, 2016 8:00 am

You can set both accepted mime types and file types in UploadOptions. Accepted mime types is used to restrict the file types displayed by the file browser, but I seem to remember that some browsers will always display the "all types" option regardless. File types works differently and is used on the server to check the file type when it is uploaded.
0 x


Who is online

Users browsing this forum: No registered users and 20 guests