php - jQuery File Upload, limit files to 1 image and 1 video? -
i attempting use jquery plugin uploading files http://blueimp.github.com/jquery-file-upload/
i want able limit files user can upload 1 image , 1 video. know set form allow jpg, gif, png, mov , mp4 files not stop uploading 2 images or 2 videos. there way limit 1 image , 1 video?
you can set maximum number of files, uploadable @ once 2, inside php.ini. if want limit per user, can in backend.
check extension php layer. provide user context before upload (ajax post can do), process in backend know if user has done his/her uploads. based on value of response, can upload file in callback.
a frontend processing, kind of page level acl, can initialized @ time of page loading based on user information, , allowing or disallowing him uploading need kind of invalidation cache.
Comments
Post a Comment