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)
Sat, Apr 6, 8:36 PM
Unknown Object (File)
Fri, Mar 29, 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
Unknown Object (File)
Jan 25 2024, 10:23 AM
Unknown Object (File)
Jan 1 2024, 4:46 PM
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