statamic / ideas

đź’ˇDiscussions on ideas and feature requests for Statamic
https://statamic.dev
30 stars 1 forks source link

Implement Max File Upload Size for Assets Container #1109

Closed emran-alhaddad closed 3 weeks ago

emran-alhaddad commented 5 months ago

Overview: I am writing to request a feature that I believe would significantly enhance the usability and management of the Statamic CMS, particularly in scenarios involving content creation and asset management. Currently, in the Statamic CMS, there appears to be no restriction on the maximum file upload size within the assets container. While there are restrictions on the asset field for maximum file size, this does not prevent content creators from uploading large media files directly to the assets container. This can lead to unintended server space consumption, as large files can be uploaded without any constraints.

Steps to Reproduce:

Log into the Statamic dashboard as a content creator. Navigate to the assets container. Attempt to upload a file of any size, including those exceeding typical file size limits. Observe that there is no restriction on the upload, and the file is uploaded successfully regardless of its size. Expected Behavior: Ideally, there should be a configurable option to set a maximum file upload size limit at the assets container level. This would prevent content creators from uploading files that are excessively large, thus conserving server storage space and ensuring better management of assets.

Actual Behavior: Currently, content creators can upload files of any size to the assets container. This can lead to situations where large files consume significant amounts of server space, potentially affecting website performance and storage management.

I believe implementing this feature would greatly benefit many Statamic users, especially those managing sites with heavy asset usage. Thank you for considering this request, and I look forward to any updates regarding its feasibility and implementation.

andjsch commented 5 months ago

Great idea, like that.

That certainly would be a JS feature as PHP starts to process the file after the upload has finished.