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
Hi! First off, thank you for maintaining django-storages—it’s been a fantastic tool in so many of my projects.
That said, I ran into a bit of a challenge recently when dealing with file uploads in a project. Right now, django-storages handles uploads by routing files through the application server. While this works, it has some drawbacks, especially when dealing with large files or users with slower internet connections. Timeouts become a real issue, and the server ends up consuming a lot of unnecessary bandwidth.
A solution I’ve used in the past (outside of django-storages) is presigned URLs. They allow users to upload files directly to storage services like AWS S3 without involving the application server. This offloads the heavy lifting to the storage provider, avoids timeouts, and makes the whole process more scalable.
Feature Request:
It would be great if django-storages could natively support generating presigned URLs. For example, we could have a method like this:
This could use boto3’s generate_presigned_url method for AWS S3. Ideally, similar functionality could be added for other storage backends, like Azure Blob Storage and Google Cloud Storage.
Why This Matters:
Here’s why I think this would be a great addition:
Scalability: By letting users upload files directly to the storage backend, we reduce the load on the application server and avoid timeout issues.
Better User Experience: Large file uploads, especially for users on slow networks, become much smoother.
Security: Presigned URLs are time-limited and can restrict access to specific files, reducing the risk of path traversal attacks or malicious uploads.
Modern Workflow: Direct-to-cloud uploads are becoming the standard in many applications, and this feature would make django-storages more aligned with these modern practices.
Challenges to Consider:
I realize this could involve a bit of work:
Ensuring compatibility across different storage backends.
Adding proper documentation and examples so users can easily integrate this into their workflows.
References:
Here are some links I found useful while working on this myself:
Hi! First off, thank you for maintaining
django-storages
—it’s been a fantastic tool in so many of my projects.That said, I ran into a bit of a challenge recently when dealing with file uploads in a project. Right now,
django-storages
handles uploads by routing files through the application server. While this works, it has some drawbacks, especially when dealing with large files or users with slower internet connections. Timeouts become a real issue, and the server ends up consuming a lot of unnecessary bandwidth.A solution I’ve used in the past (outside of
django-storages
) is presigned URLs. They allow users to upload files directly to storage services like AWS S3 without involving the application server. This offloads the heavy lifting to the storage provider, avoids timeouts, and makes the whole process more scalable.Feature Request:
It would be great if
django-storages
could natively support generating presigned URLs. For example, we could have a method like this:This could use
boto3
’sgenerate_presigned_url
method for AWS S3. Ideally, similar functionality could be added for other storage backends, like Azure Blob Storage and Google Cloud Storage.Why This Matters:
Here’s why I think this would be a great addition:
django-storages
more aligned with these modern practices.Challenges to Consider:
I realize this could involve a bit of work:
References:
Here are some links I found useful while working on this myself:
Thanks again for all the work you do on this project—I really appreciate it! Looking forward to hearing your thoughts.
The text was updated successfully, but these errors were encountered: