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
F19069152: D19193.id45972.diff
Sun, Nov 30, 1:09 PM
F19056220: D19193.id45968.diff
Fri, Nov 28, 7:12 PM
F19033588: D19193.id.diff
Tue, Nov 25, 11:12 AM
F19016015: D19193.diff
Sun, Nov 23, 2:38 AM
F18864684: D19193.diff
Nov 3 2025, 8:16 AM
F18823320: D19193.id.diff
Oct 23 2025, 11:19 AM
F18820811: D19193.diff
Oct 22 2025, 5:14 PM
F18790575: D19193.diff
Oct 15 2025, 3:42 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.