I encountered with small WP problem. I want to limit one folder (images/avatars), that it should not go to upload file biggest than 100KB. How I can limit this folder? Thanks!
Leave a Reply
You must be logged in to post a comment.
I encountered with small WP problem. I want to limit one folder (images/avatars), that it should not go to upload file biggest than 100KB. How I can limit this folder? Thanks!
You must be logged in to post a comment.
As you have not posted any code or your effort , let assume example this is code to handle your media post! in WP.
In my form:
<input type="file" name="file-upload" id="file-upload" /
>As far as I know, WordPress has nothing built in for this, I would just do:
Or create a custom function
to calculate file size and then if size is greater than 100K and uploaded folder is images/avatars… you can drop user request with some error message!