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
F15556045: D14970.id36173.diff
Mon, Apr 28, 2:22 PM
F15552633: D14970.id36164.diff
Sun, Apr 27, 9:49 PM
F15551830: D14970.id.diff
Sun, Apr 27, 6:44 PM
F15548093: D14970.diff
Sat, Apr 26, 9:48 PM
F15537444: D14970.id36173.diff
Thu, Apr 24, 1:46 PM
F15533127: D14970.id36164.diff
Wed, Apr 23, 6:21 PM
F15485858: D14970.id36173.diff
Thu, Apr 10, 3:04 AM
F15421630: D14970.id36164.diff
Mar 22 2025, 1:26 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