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
F15701056: D14970.id.diff
Wed, May 28, 6:37 PM
Unknown Object (File)
Wed, May 28, 1:41 AM
Unknown Object (File)
Sun, May 25, 6:51 AM
Unknown Object (File)
Thu, May 8, 10:33 AM
Unknown Object (File)
Apr 28 2025, 2:22 PM
Unknown Object (File)
Apr 27 2025, 9:49 PM
Unknown Object (File)
Apr 27 2025, 6:44 PM
Unknown Object (File)
Apr 26 2025, 9:48 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