OSC / ood_appkit

https://osc.github.io/Open-OnDemand/
MIT License
1 stars 2 forks source link

Add URL helper for the new download URI #27

Closed nickjer closed 8 years ago

nickjer commented 8 years ago

PUNs now come with the new download URI:

/pun/download/<path/to/file>

This should be treated very similarly for what we do with OodAppkit::Url::Files w/o the API.

ericfranz commented 8 years ago

Do we need this now that Rails send_file handles this for us? Ah - perhaps for views displaying links to results files. Would this be a replacement for https://github.com/OSC/ood_appkit#rack-middleware-for-handling-files-under-dataroot?

Note: once switching to this, results files will no longer be available if it is not deployed under OOD instance. This might trip people up with tests or doing things via command line. But it probably isn't a big deal.

nickjer commented 8 years ago

I am now leaning against this. I believe we should leverage the Rails supplied send_file method. We can control whether the disposition is inline or attachment.