-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
Is there a way to limit the file types to be uploaded by the FileUpload component?
For instance if I want only image files to be uploaded, in the file upload dialog, the user will only be able to select image files (gif, jped, png, etc.)! Nothing else.
For example, there may be a property of the fileupload component such as:
<fileupload contentType="image" /> <fileupload contentType="*.gif" /> <fileupload contentType="*.gif,*.jpeg" />
Hi natnan,
Sure you can check the type after uploading the file, but as I said in my previous post, I don't want to do that. That point is too late!
What I want is to prevent the user from even selecting a file of a type (in the file upload dialog) which is different than the one I specify.
There is an attribute 'accecpt' which defined the content type of HTML 'input' tag when type is 'file',
but no famous browser implement it for now, and cause of this restriction ZK hard to implement this feature.
Asked: 2008-08-09 12:41:25 +0800
Seen: 424 times
Last updated: Mar 03 '14