Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18149] On iOS Document viewer html files in tempDirectory cannot show images

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionCannot Reproduce
Resolution Date2019-12-12T19:02:11.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTiAPI
LabelsDocumentViewer, IOS, html, image
ReporterMauro Piccotti
AssigneeUnknown
Created2014-12-04T08:57:43.000+0000
Updated2019-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.

Comments

  1. Shuo Liang 2014-12-05

    Hi, Please provide us a simple test case to reproduce your problem, Thanks Regards, Shuo
  2. Mauro Piccotti 2014-12-05

    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();
  3. Alan Hutton 2019-12-12

    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

JSON Source