Fix image rendering

Summary:
Images in the network plugin are rarely displayed in the network plugin, as it tries to use the public url to preview it. However, that won't if the endpoint is behind authentication, idempotent, etc. This diff changes the behavior to instead send the network body to flipper and use that to preview.

Changelog: [Network] Fixed image preview

Reviewed By: jknoxville, passy

Differential Revision: D23370743

fbshipit-source-id: 0070e9e38c10a5761b9f7190467e26f01a7b2471
This commit is contained in:
Michel Weststrate
2020-09-02 05:11:14 -07:00
committed by Facebook GitHub Bot
parent 9785a03ebd
commit 2f7a84115c
2 changed files with 13 additions and 6 deletions

View File

@@ -148,8 +148,6 @@ public class NetworkFlipperPlugin extends BufferingFlipperPlugin implements Netw
return false;
}
return contentType.value.contains("image/")
|| contentType.value.contains("video/")
|| contentType.value.contains("application/zip");
return contentType.value.contains("video/") || contentType.value.contains("application/zip");
}
}