Languages

Menu
Sites
Language
Get the path of the choosen picture

Hello everyone,

I am using a code to get a picture from the camera of the emulator, besides I have the following code to display the picture URL:

           //picture url
            var picURL = windowURL.createObjectURL(fileInput[0]);
            if(picURL !=null){
                console.log(picURL);
            }

when I execute, I got this result:

     blob:file:///f235a851-813f-490a-a422-8a69f4b742c7

 

I have been told that I cannot get what I exactly want (the URL of the picture + extension) because there is no other API for it, but I thought about 2 things: 1-

1- Is there any possibility to convert this "blob" object to an image (with the extension "png/jpg/bmp/etc....")?

OR

2- What is the path of the entire pictures gallery stored in the emulator?

 

Hope that my point is clear...

Thanks in advance

 

Responses

2 Replies
GEUNSOO KIM

1. I'm afraid not, because 'preventing to get real path' is the purpose of the blob url.

2. you can try the following folders for camera stuff

Tizen 3.0 or later:

/home/owner/media/DCIM/Camera

Tizen 2.4 or older:

/opt/usr/media/DCIM/Camera

For the other images, check other folders on the "media" folder.

you may need to be "root" user to look into the folders in device shell for 2.4 or older version of emulator, (sdb root on).

And keep it mind that the folder path could be different depend on the platform (but usually not).

 

karray gargouri

Hi,

I was able to send a base64 image to my php file (located in my local wamp server) from the emulator.... The problem is that the output of this script is, actually, an image but it is black!!!

I try to extract the base64 image content (please see file in the link)

https://upload.cat/5d2352ad15552381

In another hand, I tried to decode the base64 file using some dedicated website but it doesn't work !!!

I wonder if my file content format is correct and could you test it for me.