Issue #169 resolved

Setting content-disposition = attachment with S3Boto

Greg Taylor avatarGreg Taylor created an issue

We have the need to adjust the content-disposition header that S3 returns, and I wanted to see if there was any way we could work this into django-storages.

I'm working on getting django-athumb to use django-storages instead of the storages fork I did ages ago to make some custom performance-related changes long ago. Here's what my current download-as-attachment looks like right now:

I have it as a separate method so I'm not changing the signature of url(). This falls outside of the Django storage API, but I couldn't find another great way to do this while re-using the rest of the storage backend's magic.

boto handles this, but I figured it'd be better to go through the storage backend, rather than go at it manually (what would be the point of having this storage backend abstraction?).

If you're interested, let me know how you'd like me to work this in and I'll send a PR.

Comments (4)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.