Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Feature Request › Maximum size of media library for Vendor or Group
- This topic has 6 replies, 2 voices, and was last updated 6 years, 4 months ago by WCFM Forum.
- AuthorPosts
- July 29, 2018 at 8:40 pm #27180WWWParticipant
Right now we can only limit the “disk usage space” on published posts, but I do not see how could I set a maximum MB limit to a vendor uploads. Only the file size is limited by server, but that seems to be it.
Is there an option to somehow limit maximum size of uploadable media for vendors? - July 29, 2018 at 8:43 pm #27181WCFM ForumMember
Hi,
Disk Space is total size of vendor’s added media files.
So it’s your required option 🙂
Thank You
- July 29, 2018 at 9:23 pm #27184WWWParticipant
Interesting, why isn’t this working for me then. I restricted the disk space for vendor to 1 and its showing on the dashboard, but I can still upload a ton of files exceeding the 1MB limit a 1000 times if i want to.
Logged as an admin I can see all those files uploaded as a vendor on wp back-end media gallery.
So the feature is not working. - July 30, 2018 at 4:27 am #27224WCFM ForumMember
Hi,
Are you able to add any more product as that vendor?
Actually, we just block “Add Product” on the basis of that.
Without product nothing will work, hope you understand this.
Thank You
- July 30, 2018 at 6:04 am #27230WWWParticipant
No, the product limit works fine.
Do you understand what the problem is for me? Lets say I am a malicious user. I make a free account in some wcfm marketplace and will be limited to lets say 1 free post. I can get in to media library by clicking add thumbnail and upload gigabytes of media without really using it for its purpose. Instead I can freely use that uploaded media URL and share it anywhere and to anyone. In other words, I could use it like a cloud storage If i want to.
As an admin I can run daily cleanup and delete the non-indexed media, but that is not a solution but a bandage.
- July 30, 2018 at 8:57 am #27248WWWParticipant
I added an extra function to put another bandage on this problem, but I would also like to have this as a functionality.
function filter_site_upload_size_limit( $size ) {
$current_user=wp_get_current_user();
if ( is_user_wcmp_vendor($current_user->ID) )
// Set the upload size limit to 500KB for users lacking the ‘manage_options’ capability.
if ( ! current_user_can( ‘manage_options’ ) ) {
// 500 KB.
$size = 1024 * 500;//chnage this code as oer your size requirement
}
return $size;
}
add_filter( ‘upload_size_limit’, ‘filter_site_upload_size_limit’, 20 );This will help me to limit vendor single uploads and therefor making them harder to build up a huge media library without actually using it.
- July 30, 2018 at 5:01 pm #27264WCFM ForumMember
Hi,
I understand your concern.
Well, “upload_size_limit” this filter no way helpful here. It’s for defining a single media file size.
We are looking for some alternate solution of this.
Thank You
- AuthorPosts
- The topic ‘Maximum size of media library for Vendor or Group’ is closed to new replies.