Maximum size of media library for Vendor or Group

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Feature Request Maximum size of media library for Vendor or Group

Viewing 6 reply threads
  • Author
    Posts
    • #27180
      WWW
      Participant

      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?

    • #27181
      WCFM Forum
      Keymaster

      Hi,

      Disk Space is total size of vendor’s added media files.

      So it’s your required option 🙂

      Thank You

    • #27184
      WWW
      Participant

      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.

    • #27224
      WCFM Forum
      Keymaster

      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

    • #27230
      WWW
      Participant

      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.

    • #27248
      WWW
      Participant

      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.

    • #27264
      WCFM Forum
      Keymaster

      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

Viewing 6 reply threads
  • The topic ‘Maximum size of media library for Vendor or Group’ is closed to new replies.