Gokapi icon indicating copy to clipboard operation
Gokapi copied to clipboard

Enhancement: Add storage quota

Open Forceu opened this issue 3 years ago • 4 comments

Forceu avatar Apr 11 '22 23:04 Forceu

If using S3, you can add a quota to the Bucket, and get this feature that way

That makes me think; Is there an Error message in the app, if the Bucket is full btw?

We set up a policy on the bucket to delete any file older than 30 days, but it might fill up anyway.

Would the users be notified that the uploads fails, because the bucket is full?

MalteMagnussen avatar May 27 '24 09:05 MalteMagnussen

If the upload fails, an error will be displayed. How are you setting the quota? And is there an API to retrieve the remaining space?

Forceu avatar May 27 '24 14:05 Forceu

We set up a policy on the bucket to delete any file older than 30 days, but it might fill up anyway.

Via the aws cli you can set the policies:

$ aws s3api put-bucket-lifecycle-configuration help

$ aws s3api put-bucket-lifecycle-configuration --bucket your_bucket_name --endpoint-url https://your.s3.instance --lifecycle-configuration '{
  "Rules": [
    {
      "ID": "Delete old objects",
      "Status": "Enabled",
      "Filter": {},
      "Expiration": {
        "Days": 30
      }
    }
  ]
}'

$ aws s3api get-bucket-lifecycle-configuration --bucket your_bucket_name
{
    "Rules": [
        {
            "Expiration": {
                "Days": 30
            },
            "ID": "Delete old objects",
            "Filter": {},
            "Status": "Enabled"
        }
    ]
}

How are you setting the quota? And is there an API to retrieve the remaining space?

To check the remaining space, I personally just check our S3 website.

And to set the quota, I also just used the website.

Thanks for confirming the error display :)

MalteMagnussen avatar May 28 '24 09:05 MalteMagnussen

I would like to see free space of local storage.

Ivan-NDCon-Group avatar Apr 29 '25 17:04 Ivan-NDCon-Group