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
F13269814: D19193.diff
Wed, May 29, 7:45 AM
F13216857: D19193.id45972.diff
Sat, May 18, 2:40 AM
F13216671: D19193.diff
Sat, May 18, 1:51 AM
F13200258: D19193.diff
Mon, May 13, 10:44 PM
F13182296: D19193.diff
Thu, May 9, 10:38 PM
F13181152: D19193.diff
Thu, May 9, 9:13 AM
Unknown Object (File)
Apr 29 2024, 5:57 PM
Unknown Object (File)
Apr 29 2024, 5:03 PM
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.