Klaus

Client side file upload checks

 Thu, 16 Apr 2015 00:45:49 +0200 
Working on the quota plugin for #RedDAV I was looking for some client side possibilities. Right now you first upload a file just to get to know that the file was too big or your quota was full, etc and that it failed. The screenshot shows a quick poc how we could check on client side for upload limits before actually uploading files. This cannot replace the quota plugin, but would improve user experience and reduce unnecessary transferred data I think.

Image/photo

You select the files you want to upload and it will calculate on the client side already a total filesize and this we could check against various limits like php upload limit, free quota, etc. and already inform the user before starting to upload anything. The example also displays some information of all selected files. If it is an image it even shows a preview.

@RedDAV Developers+
Habeas Codice
 Fri, 17 Apr 2015 01:14:59 +0200 
ahh sabredav plugin not redmatrix plugin, gotcha
Klaus
 Fri, 17 Apr 2015 01:31:10 +0200 
Information overkill... It got way too much information to display in a useable way, but the functionality works ;-)

Image/photo

It displays and checks now PHP limits for post_max_size for the total size of all selected files and upload_max_filesize for the filesize limit of a single file. If a file is bigger than the upload_max_filesize this file is marked with a red border.
Service class, free storage limits or other accounting stuffs could be added, too if required.
Works quite good so far, but I haven't tested this JavaScript Files object in other browsers yet.