Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create full audio download route #353

Closed
atruskie opened this issue Feb 23, 2018 · 0 comments · Fixed by #354
Closed

Create full audio download route #353

atruskie opened this issue Feb 23, 2018 · 0 comments · Fixed by #354

Comments

@atruskie
Copy link
Member

We've intentionally not exposed downloading of full audio source files before. We've got a number of reasons for doing so (including bandwidth costs!).

However, given the limits of HPC systems, it would be useful to allow downloading original source files in some limited fashion. Thus:

  • Create a new route, /audio_recordings/123456/original
  • That route triggers a download of the full original source file
  • It must use the send_file function
  • It must not support transcoding or trimming
  • It must only be exposed to the Admin or Harvester roles
@atruskie atruskie self-assigned this Feb 23, 2018
atruskie added a commit that referenced this issue Feb 26, 2018
Closes #353

Extends the Media controller so that original audio files can be downloaded. Currently limited to harvester or admin only (as enabling this generally could be expensive in terms of bandwidth).

Also:
- Supports range requests for original audio
- Adds two helper funtions to AudioRecording model: a split hash function that reliably splits the hash protocol from the hash value; and a canonical filename function that can generate ideal storage names for audio recordings
- Also fixes `original_file_paths` and `original_format_calculated` methods on AudioRecording
- Adds support to range request for configuring download names and content disposition types
- Patches acceptance spec helper so that large binary blobs are not printed when tests fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant