0

I want to use a HTML file in USD drive which is connected to android phone using a USB connector. There is an image in the webpage with the following code (the image is in same folder with HTML file):

<img src="test.jpg">

I have also tested ./test.jpg and /test.jpg as the relative path to display the image in the webpage but no success. What is the correct relative path for calling images and videos in a HTML file in USB flash drive?

Foot note:

When I open the HTML file in the android chrome browser the path in the address bar is:

content://com.sec.android.app.myfiles/.FileProvider/extrenal/DE1F-B20B/index.html

which seems to be a different in different devices. Is there a way to set the addresses relative to this format?

Ali Sheikhpour
  • 10,475
  • 5
  • 41
  • 82
  • The browser should change than `content://com.sec.android.app.myfiles/.FileProvider/extrenal/DE1F-B20B/index.html` to `content://com.sec.android.app.myfiles/.FileProvider/extrenal/DE1F-B20B/test.jpg`. Most browsers will not do that. And if they did they probably could not read the file as the read permission would fail. – blackapps Nov 21 '21 at 16:25
  • `What is the correct relative path for calling images and videos in a HTML file in USB flash drive?` You suggest that you can serve html files from external storage or removable micro sd card which display the images. But that will not go either. As it is not the usb drive that spoils it but using a content scheme. – blackapps Nov 21 '21 at 16:31

0 Answers0