BuddyDev

Search

[Resolved] Mediapress not restricting upload storage quota, displayed quota is wrong

Tagged: 

  • Participant
    Level: Enlightened
    Posts: 57
    Stephanie on #53294

    Hello Brajesh,

    Sorry to open an old question.

    Previously I uploaded images to Mediapress to test the storage quota restriction and the result was that the quota seemed to fill early unexpectedly even if the uploaded file size was smaller than the restriction eg it said it was filled at 3mb when the restriction was 5mb). The answer was that the storage looks at not just the size of the uploaded file, but the total stored items including subsizes of, say, thumbnails. This made sense.

    However, I tested it again with audio files (without the third party storage limiter plugin) and I can upload more than the restricted amount ie I uploaded 15mb of files (one 7mb mp3 file, and one 8mb mp3 file) with a 10mb restriction, and only when I tried to upload a third file did it say I have run out of storage space.

    As a reminder, I am the admin, it is a normal site (not a multisite), and I am using Litespeed cache. I now have WordPress 6.6.2 and Mediapress 1.5.9.
    Thank you

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #53295

    Hi Sephanie,
    Thank you for the reply.

    Can you please tell us which version of BuddyPress are you using?

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 57
    Stephanie on #53303

    Hello Brajesh,
    I have Buddypress version 14.1.0.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #53311

    Hi Stephaine,
    Thank you.

    Please allow me to test it and get back to you early next week.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 57
    Stephanie on #53351

    Hello Brajesh,

    I wanted to provide some information from some tests I did.

    I installed a fresh instance of Buddypress (Version 14.1.0) and Mediapress (Version 1.5.9) on a fresh installation of WordPress 6.6.2, and used a test user to create some test galleries. The storage limit is set to 10mb. I created test galleries for photos, audio, and video. I tested each media type one at a time, deleted the gallery, then tested the next one. No third party plugins except LiteSpeed Cache (Version 6.5.2) were activated.

    Process:

    1. Create a gallery for media type 1, eg photos.
    2. Upload a bunch of files (or one at a time) until no more can be uploaded/storage quota is fully used.
    3. Check how mnay mb’s worth of photos were uploaded by adding the file sizes of the uploaded files together or checking how large the file is.
    4. Delete the entire gallery so the storage guota goes back to 100% of storage space is available

    Repeat this process for Audio and Video.

    Results:
    Photos:
    When I batch uploaded a group of small pictures (each up to 1mb in file size), 16mb’s worth of photos (8 files at the same time) were uploaded before the quota was reached and no more could be uploaded.

    When I uploaded a single picture of a large size (14.1mb), it was successfully uploaded. Then I tried to upload another photo to the same gallery, this time 8.12mb and it also uploaded successfully (14 + 8 is now 22mb, already more than twice the 10mb limit). I did this again by uploading a 11mb photo and it uploaded successfully too (total of 33mb). The quota message said “You have 17% of your 10MB space left”. I did not continue to see how many more image files I could upload in total using this method.

    With this message showing, and without deleting anything, I created an audio gallery and successfully uploaded a 30mb audio file. The total uploaded size is now 63mb. I uploaded another audio file of 12mb, this one failed. The message at the bottom of the upload area says “Unable to upload. You have used the allowed storage quota!” but the message at the top still says “You have 17% of your 10MB space left” (had to refresh the page for it to change to “You have 0% of your 10MB space left”, so this might not be real time updated. This is not ideal but less of a problem than the storage quota exceeding, I just wanted to mention it so you know exactly what I experienced.

    Next: Deleting the audio gallery so that only the image gallery remains reverts the quota message to “You have 17% of your 10MB space left” even though it had 33mb of files.

    Audio files:
    When I uploaded audio files (after deleting all galleries and starting over)- 15mb’s worth (2 files at the same time) were uploaded before the quota was reached.

    When I uploaded a single, large (30mb) audio file (after deleting all the galleries and starting over), it uploaded successfully, and the message at the top said “You have 0% of your 10MB space left” in real time wihtout needing to refresh the page. When I continued to upload another audio file of 12mb, it said the quota was reached and could not be uploaded.

    Videos:
    When uploading videos, again, more than 10mb was uploaded before the quota was reached. On three separate occasions (deleting the gallery in between and re-creating a new gallery), I uploaded a single video file, all more than 10mb: one that was 19mb, one that was 60mb, and one that was 166mb, all were successfully uploaded. When I deleted the gallery and tried to upload the 19 and 60mb files at the same time, the 19mb video was successfully uploaded but the 60mb video was not (quota reached). I tried one more time where I started a new video gallery, uploaded the 166mb video (successfully) then uploaded the 19mb video. This time, the 19mb video failed to upload.

    Summary:
    It seems that when uploading pictures, you can upload individual files that are larger than the default storage limit, and can continue to do so without storage restrictions as long as you upload one at a time, but the same cannot be said for audio files and videos.

    Also, regardless of the medium, it seems that you can upload any sized file, even much larger than the limit, if you upload just 1 per upload.

    The fact that 166mb’s worth of was able to be uploaded is not good – on a membership website (which is what Buddypress is for), if everyone did this, the storage space would run out quickly.

    Thank you for reading

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #53376

    Hi Stephanie ,
    Thank you for the assistance. I am currently testing it and I will have an update by the day end today.

    regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #53387

    Hi Stephanie,
    Thank you for the patience.

    I tested it today and I do see one issue. I will explain and will proceed based on your feedback.

    1. The restriction is working but there is a minor bug. If you set the upload quota to 2MB, and there is available space for say .8Mb but media of more than .8Mb is tried, It will go through.
    The reason is we only calculate what has been uploaded and not what is being uploaded.

    That is causing the last file (which may be larger) to go through and we need to fix this.

    I was not able to find any issue. Please let me know if this is the right issue and I will update the plugin.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 57
    Stephanie on #53393

    Hello Brajesh,

    Thank you for taking the time to test the issue.

    I am not sure if the issue you found is the same as the issue I am experiencing. Based on my tests, files larger (Eg 166mb) than the restriction (eg 10mb) gets successfully uploaded. But your description sounds like files smaller (eg >0.8mb but less than 2mb) than the restriction (2mb) gets uploaded.

    In any case: my issue is, files larger than the storage restriction (sometimes significantly larger) is getting sucessfully uploaded. Particularly with image files, it seems you can upload an unlimited number of files that are larger than the restriction as long as you upload them one at a time. It also seems HOW the files are uploaded, affects whether certain files can get uploaded or not (as you can see in the video upload test, when I tried to upload the 19 and 60mb files at the same time, the 19mb video was successfully uploaded but the 60mb video was not, even though both are over the limit of 10mb, then, when I uploaded the 166mb video by it self in a new gallery, it was uploaded successfully, then uploaded the 19mb video separately to the sam gallery, the 19mb video did not get uploaded) These are the issues I am experiencing.

    Also I am a little confused with your statement “I was not able to find any issue.” Was this a typo, should it say “I was not able to find any other issues.”? Because you also stated that you “do see one issue”. I ask this because I am not sure if there is a single issue causing all the symptoms I described in my test, or if it is more than one issue.

    Thank you
    Stephanie

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #53440

    Hi Stephanie,
    I am sorry, I haven’t been able to work on it and provide you with better response.

    This is a festive holiday week here and I will be working on this issue early next week. Please expect a solution by early/mid next week.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 57
    Stephanie on #53497

    Hello Brajesh,
    Hope you had a nice break. Just wanted to bump this topic so it’s not forgotten.

    Thanks
    Stephanie

You must be logged in to reply to this topic.

This topic is: resolved