datopian / ckanext-blob-storage

CKAN extension to offload blob storage to cloud storage providers (S3, GCS, Azure etc).
http://tech.datopian.com/blob-storage/
MIT License
14 stars 6 forks source link

Support for Content-Disposition: inline #58

Closed amercader closed 3 years ago

amercader commented 3 years ago

Actually all these changes do is supporting an incoming ?preview=1 query argument on download URLs and forward the x-disposition = inline extra to Giftless when requesting the download URL.

At that point https://github.com/datopian/giftless/pull/90 will kick in and the storage backend will return the appropiate headers.

The only way to pass this parameter all the way down to the action that requests the downloadURL was to add a new argument to the download handlers. This would break backwards compatibility so I've added code to support plugin hooks that don't support the new inline arg.

pdelboca commented 3 years ago

Thanks @amercader for this fix!