#1 2016-12-02 02:11:11

edunt
Member
Registered: 2015-12-21
Posts: 258

Where is the captured image name in the Camera2 sample application

Hi,

How do you name the picture the taken before upload to the web server?

Thanks

Offline

#2 2016-12-02 09:24:34

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,659
Website

Re: Where is the captured image name in the Camera2 sample application

Hello Ade,

There is no name associated to the captured image, then you can simply choose whatever name you wanted, in the client side or in the server side.

Offline

#3 2016-12-02 12:41:33

edunt
Member
Registered: 2015-12-21
Posts: 258

Re: Where is the captured image name in the Camera2 sample application

David wrote:

Hello Ade,

There is no name associated to the captured image, then you can simply choose whatever name you wanted, in the client side or in the server side.

Hi David,

I have choose name from the server side e.g

$imgFileName = 'upload_images/'. date('Y-m-d-H:i:s') .'.jpg';

But I am not sure how to get it on the client side at the moment.

Offline

#4 2016-12-02 12:44:51

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,659
Website

Re: Where is the captured image name in the Camera2 sample application

Hello Ade,

If I am not wrong we can't get it at the client side. We are not choosing an image (with the File input control, for example) but captured a new one. What the Camera control offers to us is the Base64 representation of the captured image and nothing more, then the name of that capture is up to us and we can assign any name. If you want to establish it in the client side, just prepare your own one and send it to the server in addition to the Base64 text.

Offline

#5 2016-12-02 19:36:51

edunt
Member
Registered: 2015-12-21
Posts: 258

Re: Where is the captured image name in the Camera2 sample application

David wrote:

Hello Ade,

If I am not wrong we can't get it at the client side. We are not choosing an image (with the File input control, for example) but captured a new one. What the Camera control offers to us is the Base64 representation of the captured image and nothing more, then the name of that capture is up to us and we can assign any name. If you want to establish it in the client side, just prepare your own one and send it to the server in addition to the Base64 text.

Alright, that is what I will do.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.