语言

Menu
Sites
Language
How to get the URL of the taken 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

In fact, I want to get the URL of the picture where it is stored (as waell as the pixture extension).

 

Thank you in advance.

响应

2 回复
GEUNSOO KIM

1. you can use the "blob" url as same as a url (I think it works just image file only though..)

2. As far as I have known, I'm affraid that you cannot get what you exactly want because there is no other API for it.

 

karray gargouri

Thank you GEUNSOO KIM for your reply!

but what should I do if I want to save my picture on a server using the URL? I found a PHP script that allow me to do such a treatment, but it needs the URL of the picture and the extension.