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
F13210703: D14970.diff
Fri, May 17, 5:07 AM
F13201830: D14970.id36173.diff
Tue, May 14, 5:09 PM
F13194659: D14970.diff
Sun, May 12, 9:45 PM
F13179165: D14970.diff
Wed, May 8, 9:00 PM
Unknown Object (File)
Sat, May 4, 6:25 PM
Unknown Object (File)
Wed, Apr 24, 10:49 PM
Unknown Object (File)
Fri, Apr 19, 4:04 PM
Unknown Object (File)
Apr 6 2024, 8:36 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