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)
Thu, Dec 12, 3:37 AM
Unknown Object (File)
Fri, Nov 29, 6:25 PM
Unknown Object (File)
Tue, Nov 26, 12:40 PM
Unknown Object (File)
Oct 30 2024, 7:27 PM
Unknown Object (File)
Oct 18 2024, 7:46 AM
Unknown Object (File)
Oct 15 2024, 10:43 PM
Unknown Object (File)
Oct 11 2024, 10:25 PM
Unknown Object (File)
Oct 5 2024, 10:30 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable