Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Support to import/export user uploaded data (from the default media storage) #28

Open
semente opened this issue Nov 22, 2013 · 5 comments

Comments

@semente
Copy link
Owner

semente commented Nov 22, 2013

No description provided.

@pconerly
Copy link
Contributor

Do you mean image and files for this?

It's an interesting and tough task-- b/c it requires going beyond django's built-in dumpdata and loaddata.

@semente
Copy link
Owner Author

semente commented Aug 19, 2014

Yep, I mean the media files that usually are stored in the MEDIA_ROOT directory of the file system. But actually I think we should consider that the user might be using a different backend for storage.

@jaap3
Copy link
Collaborator

jaap3 commented Aug 21, 2014

Maybe limit support to storage backends that support the listdir and path. That would make implementing this a bit easier.

Since user uploaded media might be extremely large you'd also need to use a streaming response to which you would write a zipfile.

Not sure if this is all possible, but those would probably be the building blocks.

It would also be nice to be able to pick which directories/files to download. So you can pick and choose what you need.

@semente
Copy link
Owner Author

semente commented Aug 21, 2014

@jaap3 👍

@jaap3 jaap3 added the ui label Aug 28, 2014
@jaap3
Copy link
Collaborator

jaap3 commented Aug 29, 2014

Got a implementation of dumping the defaultstorage to a tgz file going in a branch on my clone https://github.com/jaap3/django-smuggler/tree/dump-storage

Creating zipfiles as a stream is too hard unless I use an external dependency, so I decided not to support it.

Haven't worked on loading dumps yet. A thing to remember is to make sure they are really only extracted into the storage dir.

Since StreamingHttpResponse isn't available on Django 1.4 this would mean dropping support for 1.4.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants