You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] - Overall file Upload Limit to File Storage Service in MBs (Appwrite Buckets) #363
Add file Upload Overall Limit to File Storage Service in MBs per project. On GUI side, we can add this feature in per Project Settings. It will be good to have this feature. If this feature is added, I can limit my clients from uploading unnecessary files. Because clients don’t delete files and just keep on uploading photos or pdfs. It get piled up and eats server space. Limit will force then to delete old stuff.
Hope other community members also agrees.Hoping to see this feature implemented.
changed the title [-][Feature] - Monthly file Upload Limit to File Storage Service in MBs[/-][+][Feature] - Overall file Upload Limit to File Storage Service in MBs[/+]on May 30, 2020
Me and @christyjacob4 just talked about this as part of a buckets feature (like storage directories) where each bucket has properties like rules. One feature we talked about was limit for a single uploaded file. Maybe having a limit per directory or per project could also be useful. @christyjacob4 what do you say?
We also need to think about migration of existing data for users of Appwrite 0.6.*. We would probably create a 'default' bucket and assign all files to it.
I am trying to think about what conflicts we would have if we were to implement both scopes of limits one per project and one per bucket.
Is there a requirement to have two scopes of limits? Is there a scenario that cannot be covered by just having rules per storage bucket?
We also need to think about migration of existing data for users of Appwrite 0.6.*. We would probably create a 'default' bucket and assign all files to it.
This can be a good start and I'd like to add onto it.
Let's say a project already has some storage data (in appwrite version < 0.6.*)
With the update we migrate all that to a default storage bucket ( eg: Bucket 1) as you mentioned.
Now, when this user creates a new storage bucket (i.e Bucket 2 ), we can give him an option "Would you like to move your existing files to this new bucket"
If he agrees, we can move all his files from Bucket 1, that match the new rules , to Bucket 2..
I think we could just let him edit the default bucket (AKA Bucket 1) rules and name, that way we'll avoid any live data migration that are not part of the update+migration process between Appwrite versions.
Yeh, I think I get it. Same problem could also happen when you want to edit rules of an existing bucket, what will happen to files that don't follow the new updated rules?
in that case, let's keep it this way. Once you create rules for a storage bucket , you CANNOT EDIT IT
So if you feel you need to partition your files based on a different logic, you can ONLY create a new Bucket , where we provide the option to migrate the files .
We can have both max file size and max bucket, don't see any reason to favor one over the other. Both can be pretty beneficial for different use-cases, like storage cost of abuse protection. I really like the idea of having both.
Migrating files is something I would try to avoid at almost any cost. We won't be able to this smoothly with a big or even medium amount of files in a bucket during run time. The worst case is that this is a one time process as part of a planned upgrade where your data server data has been backed up in advance.
I think that rules can be valid for new files being upload. If a developer decides to change the validation rules, He or she should be responsible for choosing what to do with existing files in the bucket + we provide all the API and tools for them to do what they want.
Thank you for considering Bucket Size Rule as well, it will help to solve my use case.
Regarding Files migration to another bucket, since you are planning to make bucket rules immutable, I suggest you to allow users to download all the contents from a bucket in zip format. Once the user downloads all the contents of the bucket (for e.g. Bucket-1 ), he can delete bucket-1 and re-upload the content in bucket-1, after re-creating it, with new rules applied. I believe each project will have buckets with unique names.
@punitdiwan each user will be able to delete or create file using the existing API, so we have max flexibility in this area as of today.
Zipping all the file on a storage bucket with gigabytes of data will kill an Appwrite server on low hardware or no scalability applied and will also potentially be a very slow process. As long as we have the API available, each developer can do whatever best fit his use-case, capacity and scaleability capabilities.
I suggest add two Keys Max Bucket Size Renaming and Max Bucket Size Allowed. The Max Bucket Size Remaining ( updates on delete / on create) and Max Bucket Size Allowed remained fixed and will be defined on Bucket Creating time from API or Console.
changed the title [-][Feature] - Overall file Upload Limit to File Storage Service in MBs[/-][+][Feature] - Overall file Upload Limit to File Storage Service in MBs (Appwrite Buckets)[/+]on Jun 4, 2020
Activity
[-][Feature] - Monthly file Upload Limit to File Storage Service in MBs[/-][+][Feature] - Overall file Upload Limit to File Storage Service in MBs[/+]eldadfux commentedon May 30, 2020
Me and @christyjacob4 just talked about this as part of a buckets feature (like storage directories) where each bucket has properties like rules. One feature we talked about was limit for a single uploaded file. Maybe having a limit per directory or per project could also be useful. @christyjacob4 what do you say?
christyjacob4 commentedon May 30, 2020
@eldadfux I suggest that we can have rules per storage bucket.
storage
|----- Bucket 1
|-------- file1.jpg
|-------- file2.jpg
|----- Bucket 2
|----- Bucket 3
For Bucket 1 , we can have rules as follows
We would not want to do it per project because that would take away the flexibility of having rules per bucket.
WDYT @eldadfux ?
eldadfux commentedon May 30, 2020
I am trying to think about what conflicts we would have if we were to implement both scopes of limits one per project and one per bucket.
eldadfux commentedon May 30, 2020
We also need to think about migration of existing data for users of Appwrite 0.6.*. We would probably create a 'default' bucket and assign all files to it.
christyjacob4 commentedon May 30, 2020
Is there a requirement to have two scopes of limits? Is there a scenario that cannot be covered by just having rules per storage bucket?
This can be a good start and I'd like to add onto it.
Let's say a project already has some storage data (in appwrite version < 0.6.*)
With the update we migrate all that to a default storage bucket ( eg: Bucket 1) as you mentioned.
Now, when this user creates a new storage bucket (i.e Bucket 2 ), we can give him an option "Would you like to move your existing files to this new bucket"
If he agrees, we can move all his files from Bucket 1, that match the new rules , to Bucket 2..
eldadfux commentedon May 30, 2020
I think we could just let him edit the default bucket (AKA Bucket 1) rules and name, that way we'll avoid any live data migration that are not part of the update+migration process between Appwrite versions.
christyjacob4 commentedon May 30, 2020
Okay yes I agree that we need to keep the migration simple. But my use-case was after the migration is done
Here's the use-case once again.
Bucket 1 contains
file1.jpg
file2.jpg
file3.pdf
file4.docx
file4.png
Lets say the user now creates a new bucket Bucket 2 and added the following rules
We should provide an option "Hey do you want to also migrate your existing files which satisfy the rules from other buckets to Bucket 2?"
Let me know if you need more clarity on the usecase?
eldadfux commentedon May 30, 2020
Yeh, I think I get it. Same problem could also happen when you want to edit rules of an existing bucket, what will happen to files that don't follow the new updated rules?
punitdiwan commentedon May 30, 2020
@eldadfux and @christyjacob4 Regarding the file Buckets, what maxFileSize Rule denotes, will it be monthly or overall or its individual file size
christyjacob4 commentedon May 30, 2020
in that case, let's keep it this way. Once you create rules for a storage bucket , you CANNOT EDIT IT
So if you feel you need to partition your files based on a different logic, you can ONLY create a new Bucket , where we provide the option to migrate the files .
wdyt @eldadfux ?
christyjacob4 commentedon May 30, 2020
@punitdiwan I was thinking of individual file size. The biggest single file that can be uploaded to that bucket must be < maxFileSize.
This is just a suggestion. We will discuss the pros and cons here before moving to the implementation
eldadfux commentedon May 30, 2020
We can have both max file size and max bucket, don't see any reason to favor one over the other. Both can be pretty beneficial for different use-cases, like storage cost of abuse protection. I really like the idea of having both.
Migrating files is something I would try to avoid at almost any cost. We won't be able to this smoothly with a big or even medium amount of files in a bucket during run time. The worst case is that this is a one time process as part of a planned upgrade where your data server data has been backed up in advance.
I think that rules can be valid for new files being upload. If a developer decides to change the validation rules, He or she should be responsible for choosing what to do with existing files in the bucket + we provide all the API and tools for them to do what they want.
punitdiwan commentedon May 30, 2020
Thank you for considering Bucket Size Rule as well, it will help to solve my use case.
Regarding Files migration to another bucket, since you are planning to make bucket rules immutable, I suggest you to allow users to download all the contents from a bucket in zip format. Once the user downloads all the contents of the bucket (for e.g. Bucket-1 ), he can delete bucket-1 and re-upload the content in bucket-1, after re-creating it, with new rules applied. I believe each project will have buckets with unique names.
Hope you like my suggestions.
Regards,
Punit
eldadfux commentedon Jun 1, 2020
@punitdiwan each user will be able to delete or create file using the existing API, so we have max flexibility in this area as of today.
Zipping all the file on a storage bucket with gigabytes of data will kill an Appwrite server on low hardware or no scalability applied and will also potentially be a very slow process. As long as we have the API available, each developer can do whatever best fit his use-case, capacity and scaleability capabilities.
eldadfux commentedon Jun 1, 2020
This is what we have so far for Bucket attributes:
Am I missing anything?
punitdiwan commentedon Jun 2, 2020
I suggest add two Keys Max Bucket Size Renaming and Max Bucket Size Allowed. The Max Bucket Size Remaining ( updates on delete / on create) and Max Bucket Size Allowed remained fixed and will be defined on Bucket Creating time from API or Console.
This will make the things more verbose.
[-][Feature] - Overall file Upload Limit to File Storage Service in MBs[/-][+][Feature] - Overall file Upload Limit to File Storage Service in MBs (Appwrite Buckets)[/+]TorstenDittmann commentedon Jun 8, 2020
Just out of curiosity I can think of two things that might be useful as attributes:
TorstenDittmann commentedon Mar 3, 2022
We just released 0.13 and this should be fixed 👍🏻
You can find the announcement here.