rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: zeehere on January 04, 2017, 09:16:17 AM

Title: File Mask : Reject forbidden extension before fully uploading the file
Post by: zeehere on January 04, 2017, 09:16:17 AM
Hi,
Using file masks, the uploaded file is checked after it gets fully uploaded. That wastes sometime and bandwidth. (for example uploading a 1GB file and getting rejected after upload)
Is there any way we can reject the forbidden extension file even before the file gets fully uploaded?
PS: I already clearly mentioned allowed file types, but its for those few users who don't read the instructions fully. :)
Title: Re: File Mask : Reject forbidden extension before fully uploading the file
Post by: bmartino1 on January 06, 2017, 03:20:07 AM
i don't know how to do it, but i'm sure there a way to make a message box saying something before an upload, or have a file check before the upload code.

a more experienced user would be required for setting something up like that.

http://stackoverflow.com/questions/14852090/jquery-check-for-file-extension-before-uploading

Title: Re: File Mask : Reject forbidden extension before fully uploading the file
Post by: LeoNeeson on January 06, 2017, 07:17:07 PM
i don't know how to do it, but i'm sure there a way to make a message box saying something before an upload, or have a file check before the upload code.
Yep, using Macros, editing the template. But I agree this should be the default behavior (not allow to fully uploading a file which is forbidden).
Title: Re: File Mask : Reject forbidden extension before fully uploading the file
Post by: dj on January 07, 2017, 07:52:46 AM
alternativ add attribute accept to input type='file' in [box upload], e.g. accept='video/*'
Title: Re: File Mask : Reject forbidden extension before fully uploading the file
Post by: zeehere on June 21, 2017, 05:08:53 AM
alternativ add attribute accept to input type='file' in [box upload], e.g. accept='video/*'
Thanks for the tip. I tried this, but it does not seem to work.
<input type='file' accept='.xls,.xlsx' />
It can still accept any file.
Title: Re: File Mask : Reject forbidden extension before fully uploading the file
Post by: rejetto on July 15, 2017, 06:39:11 PM
it could technically be done with some extra code in the template.
i will add it to the to-do list