Set trackingName for RCTImageLoader requests
Reviewed By: javache Differential Revision: D3600853 fbshipit-source-id: 46ef2d0e54e4ce417cc3d4138c8d8f60d5c34173
This commit is contained in:
parent
5f41769485
commit
eb59ae8423
|
@ -296,10 +296,16 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
|||
__block dispatch_block_t cancelLoad = nil;
|
||||
__weak RCTImageLoader *weakSelf = self;
|
||||
|
||||
// Add missing png extension
|
||||
if (request.URL.fileURL && request.URL.pathExtension.length == 0) {
|
||||
{
|
||||
NSMutableURLRequest *mutableRequest = [request mutableCopy];
|
||||
mutableRequest.URL = [NSURL fileURLWithPath:[request.URL.path stringByAppendingPathExtension:@"png"]];
|
||||
[NSURLProtocol setProperty:@"RCTImageLoader"
|
||||
forKey:@"trackingName"
|
||||
inRequest:mutableRequest];
|
||||
|
||||
// Add missing png extension
|
||||
if (request.URL.fileURL && request.URL.pathExtension.length == 0) {
|
||||
mutableRequest.URL = [NSURL fileURLWithPath:[request.URL.path stringByAppendingPathExtension:@"png"]];
|
||||
}
|
||||
request = mutableRequest;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue