Page MenuHomePhabricator

Implement "Download ZIP" controller for Phragment
ClosedPublic

Authored by hach-que on Dec 6 2013, 6:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 25, 4:58 AM
Unknown Object (File)
Tue, Dec 10, 2:59 PM
Unknown Object (File)
Mon, Dec 9, 11:10 AM
Unknown Object (File)
Sun, Dec 8, 11:16 AM
Unknown Object (File)
Fri, Dec 6, 1:04 PM
Unknown Object (File)
Thu, Dec 5, 11:34 AM
Unknown Object (File)
Thu, Dec 5, 9:30 AM
Unknown Object (File)
Sun, Dec 1, 1:53 PM

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

Lint
Lint Skipped
Unit
Tests Skipped

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
36–38

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

77–83

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