Opened 13 years ago
Last modified 13 years ago
#184 closed defect (FIXED)
Implement Cloud Files public storage backend
Reported by: | joar | Owned by: | Christopher Allan Webber |
---|---|---|---|
Priority: | minor | Milestone: | 0.0.5 |
Component: | programming | Keywords: | |
Cc: | Parent Tickets: |
Description
Use the StorageInterface to make a new public storage backend.
Change History (9)
comment:2 by , 13 years ago
Created merge request; `https://gitorious.org/mediagoblin/mediagoblin/merge\_requests/11 <https://gitorious.org/mediagoblin/mediagoblin/merge_requests/11>`_
comment:3 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | In Progress → Feedback |
comment:3 by , 13 years ago
So exciting! But, okay, a few things: :: def _resolve_filepath(self, filepath): return '-'.join( clean_listy_filepath(filepath)) Would '/'.join make more sense here? Sounds like that's totally valid: `http://www.rackspace.com/cloud/blog/2010/01/26/nested-folders-in-rackspace-cloud-files/ <http://www.rackspace.com/cloud/blog/2010/01/26/nested-folders-in-rackspace-cloud-files/>`_ Also the indentation is deeper than it should be in this method. Also, would it make sense that instead of specifying the container, the first element of the path is the container? So in ['dir1', 'dir2', 'dir3', 'file.jpg'], the container is 'dir1'. Maybe that isn't safe... I guess we haven't guaranteed that len(file\_path) > 1, which would otherwise be necessary (though currently that's our usage). So I guess this does make sense. (Maybe put another way, is there anything bad about having an insane number of files in one huge container? I'm guessing probably not... hopefully not anyway :) But it seems like the design was to allow for insane numbers of files in one container, so it's probably fine.) 2 more nitpicks: - I'd rather the cloud storage class appear **after** BasicFileStore... BasicFileStore is the reference implementation and so should be nearer the top of the file! - I'd rather that documentation inside the config file on how to use this go on the wiki than in the config file itself? Though I'd be fine with merging it as-is, it's probably TMI for someone just setting up the most basic site. But yes, looking great, stellar, amazing, fantastic. I'm stoked.
comment:4 by , 13 years ago
- mediagoblin.storage is now fully PEP-8 compliant. - mediagoblin.storage:BaseFileStorage precedes CloudFilesStorage - I have removed all the cloudfiles-specific options from ``mediagoblin.ini``, it's now in the wiki at `http://wiki.mediagoblin.org/ConfigureMediaGoblin#Setting\_up\_Cloud\_Files\_public\_storage <http://wiki.mediagoblin.org/ConfigureMediaGoblin#Setting_up_Cloud_Files_public_storage>`_ - I have NOT changed the container to be set automatically after dir1. As you say, I don't think that's the thought with containers, they are not so much directories as they are some kind of pedagogical separation when handling multiple projects on a single Cloud Files account. Will post link to repository as soon as Gitorious is back up.
comment:5 by , 13 years ago
New merge request; `https://gitorious.org/mediagoblin/mediagoblin/merge\_requests/11 <https://gitorious.org/mediagoblin/mediagoblin/merge_requests/11>`_
comment:7 by , 13 years ago
Status: | Feedback → Closed |
---|
Annnnnd merged! That was a crazy awesome discussion/implementation/merge turnaround time!
Note:
See TracTickets
for help on using tickets.