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

download .zip with image and xml #5

Open
uf0 opened this issue Jun 1, 2017 · 5 comments
Open

download .zip with image and xml #5

uf0 opened this issue Jun 1, 2017 · 5 comments
Assignees

Comments

@uf0
Copy link
Member

uf0 commented Jun 1, 2017

In the collection section we need to download the single document and the metadata.
The metadata should be formatted as xml (ref to Europeana formats) and the file served as .zip

The .zip file should be save in media/ folder and than deleted once it has been downloaded

@danieleguido
Copy link

Almost done, there is already the endpoint http://localhost:8000/api/document/1234/download/ which let you download a zip file containing the file given as attachment (only if a data.downloadableoption is set). Check the download method

@danieleguido
Copy link

Zip should be temporary

@bianchimro
Copy link
Collaborator

@danieleguido zip could even be built in memory and served directly from the view if it should be generated and deleted on a per-request basis

https://stackoverflow.com/questions/2463770/python-in-memory-zip-library

If we want some sort of "caching" instead, the zip file could be generated each time a doc is saved and served statically. (but I think it's better to generate it on the fly)

@danieleguido
Copy link

I agree @bianchimro, the best choice would be to generate the zip on the fly. Can you do a quick PR :) ?

@bianchimro
Copy link
Collaborator

@danieleguido ok I'll take a look! :)

@bianchimro bianchimro self-assigned this Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants