Page MenuHomePhabricator

Make `diffusion.filecontentquery` return file PHIDs instead of raw content
ClosedPublic

Authored by epriestley on Jan 8 2016, 2:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 10:49 PM
Unknown Object (File)
Fri, Apr 19, 4:04 PM
Unknown Object (File)
Sat, Apr 6, 8:36 PM
Unknown Object (File)
Mar 29 2024, 9:39 PM
Unknown Object (File)
Mar 8 2024, 1:03 PM
Unknown Object (File)
Mar 5 2024, 2:00 PM
Unknown Object (File)
Mar 5 2024, 7:06 AM
Unknown Object (File)
Feb 20 2024, 3:28 AM
Subscribers
None

Details

Summary

Fixes T9319. Proxied requests (e.g., in the cluster) for binary files (like images) currently fail because we can not return binary data over Conduit in JSON.

Although Conduit will eventually support binary-safe encodings, a cleaner approach to this is just to return a filePHID instead of the raw content. This is generally faster and more flexible, and gives us more opportunities to add caching later.

After making the call, the client pulls the file data separately.

We also no longer need to return a complex data structure because we don't do blame over this call any longer.

Test Plan
  • Viewed images in Diffusion.
  • Viewed READMEs in Diffusion.
  • Used bin/differential attach-commit rX Dy to hit attach pathway.

Diff Detail

Repository
rP Phabricator
Branch
diff4
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 9992
Build 12077: Run Core Tests
Build 12076: arc lint + arc unit