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)
Thu, Mar 21, 8:23 AM
Unknown Object (File)
Sat, Mar 9, 1:37 PM
Unknown Object (File)
Feb 22 2024, 3:05 PM
Unknown Object (File)
Jan 29 2024, 1:56 PM
Unknown Object (File)
Jan 24 2024, 3:53 PM
Unknown Object (File)
Jan 9 2024, 12:09 PM
Unknown Object (File)
Jan 9 2024, 12:09 PM
Unknown Object (File)
Jan 9 2024, 12:09 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