Page MenuHomePhabricator

Implement "Download ZIP" controller for Phragment
ClosedPublic

Authored by hach-que on Dec 6 2013, 6:39 AM.
Tags
None
Referenced Files
F15417204: D7728.diff
Thu, Mar 20, 3:58 PM
F15413028: D7728.diff
Wed, Mar 19, 4:30 PM
F15405885: D7728.id17474.diff
Tue, Mar 18, 11:59 AM
F15399236: D7728.id.diff
Mon, Mar 17, 3:28 AM
F15392415: D7728.id17475.diff
Sat, Mar 15, 3:05 PM
F15390437: D7728.id17474.diff
Sat, Mar 15, 6:12 AM
F15389363: D7728.id17462.diff
Sat, Mar 15, 5:09 AM
F15387981: D7728.diff
Sat, Mar 15, 3:10 AM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Maniphest Tasks
T4205: Implement Phragment
Commits
Restricted Diffusion Commit
rPccd4ae563827: Implement "Download ZIP" controller for Phragment
Summary

Depends on D7727. This adds support for downloading a fragment and all it's children as a ZIP file. Fragments that have children automatically become directories in the ZIP file.

Test Plan

Downloaded a fragment as a ZIP and was able to extract the contents successfully.

Diff Detail

Branch
phragment-zip-download
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/applications/phragment/controller/PhragmentController.php:97XHP16TODO Comment
Unit
No Test Coverage

Event Timeline

src/applications/phragment/controller/PhragmentZIPController.php
80

Probably shouldn't have the cache set to one month?

hach-que updated this revision to Unknown Object (????).Dec 6 2013, 11:24 PM

Updated for latest version of D7726

epriestley added inline comments.
src/applications/phragment/controller/PhragmentZIPController.php
35–37

Recently, there's a slightly more convenient appendParagraph().

76–82

Although this is probably safe, it's better to write it into Files and then redirect. Files refcounts actual content blobs already, so multiple calls won't write the data multiple times. This puts us a step closer to caching this, too. You can look at DiffusionBrowseFileController->loadFileForData() for the cliffnotes version of this.

hach-que updated this revision to Unknown Object (????).Dec 7 2013, 2:25 AM

Changes requested in code review