[TIMOB-18149] On iOS Document viewer html files in tempDirectory cannot show images
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2019-12-12T19:02:11.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | TiAPI |
Labels | DocumentViewer, IOS, html, image |
Reporter | Mauro Piccotti |
Assignee | Unknown |
Created | 2014-12-04T08:57:43.000+0000 |
Updated | 2019-12-12T19:02:11.000+0000 |
Description
Opening a html document saved in the temp directory (deviceId/tmp), is impossible to show images added with tag.
I tried to add the image as link to filesystem, web url and base64, in png and gif: nothing.
imagesPath is a concatenation of Ti.Filesystem.resourcesDirectory and the filepath inside assets directory.
base64 is the file conversion, Ti.Utils.base64encode(logoFile.read())
I tried to print the document and on the paper image was printed, opening the file from tmp directory with a browser (Chrome, Firefox, Safari) the image is always showed.
Hi, Please provide us a simple test case to reproduce your problem, Thanks Regards, Shuo
var file, filename, logoFile, htmlContent, docViewer; file = Ti.Filesystem.createTempFile(); filename = "test.html"; logoFile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory + 'images/logo.png'); htmlContent = 'testtest'; file.write(htmlContent); file.rename(filename); docViewer = Ti.UI.iOS.createDocumentViewer({'url':Ti.Filesystem.tempDirectory + filename}); docViewer.addEventListener('unload', function(){ Ti.Filesystem.getFile(Ti.Filesystem.tempDirectory + filename).deleteFile(); }); docViewer.show();
Closing. Unable to reproduce the issue. Axway Appcelerator Studio, build: 5.1.4.201909061933 macOS : 10.15 Node.js Version : 8.9.1 npm Version : 5.5.1 Appcelerator CLI : 7.1.2 Titanium CLI CLI Version : 5.2.1 node-appc Version : 0.2.49 Titanium SDKs : 8.3.0.GA iPhone 8 13.2.2