Page MenuHomePhabricator

When proxying an "{image ...}" image fails, show the user an error message
ClosedPublic

Authored by epriestley on Mar 8 2018, 1:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 9:39 AM
Unknown Object (File)
Fri, Nov 15, 2:49 AM
Unknown Object (File)
Mon, Nov 11, 7:37 AM
Unknown Object (File)
Thu, Nov 7, 1:05 AM
Unknown Object (File)
Oct 23 2024, 7:54 PM
Unknown Object (File)
Oct 21 2024, 8:42 PM
Unknown Object (File)
Oct 18 2024, 5:56 PM
Unknown Object (File)
Oct 18 2024, 1:03 AM
Subscribers
None

Details

Summary

Depends on D19192. Ref T4190. Ref T13101. Instead of directly including the proxy endpoint with <img src="..." />, emit a placeholder and use AJAX to make the request. If the proxy fetch fails, replace the placeholder with an error message.

This isn't the most polished implementation imaginable, but it's much less mysterious about errors.

Test Plan

Used {image ...} for valid and invalid images, got images and useful error messages respectively.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Mar 8 2018, 3:03 PM
This revision was automatically updated to reflect the committed changes.