Is it possible to send array of image through volley - android

Is is possible to send array of images using volley library in android.
e.g
param.put("images", arrayOfImages);
Please response as soon as possible.

Yes you can convert the images in base64 strings and send that array of strings using
param.put("images", arrayOfImages);

Related

How to upload array of images in each array value of the request?

I want to send array of images in each value of the request array. How can I send it through retrofit? I know we can send multiple number of images through multipart file. But how can I send many multiple part files? Any suggestions would be really helpful.

RestAPI passing images as base64 strings in POST request

I'm building a RestAPI for a mobile application where you can upload images and stuff.
My question was about how you pass actual images to the RestAPI.
My design is:
You have an endpoint /api/data/createReport
This endpoint accepts a field called images which is a comma-separated list of strings, which are the base64 encoded images.
I would then split the strings and store them somewhere (or maybe re-encode them as images).
Is this a good design?Is it safe?Is it performant?
Thanks in advance!

Getting image url from json is better or using an encoded image within json?

I have a json from server in which the image urls are send from server but i want to know if i ask my php developer person to send encoded image in json would be a better approch or the former one ?
I want to load the images in listview after that.
Thanks in Advance.
getting url will be better and clean approach.it will make your response compact and image url can be loaded any time you want where if you transmit encoded image it has to be transmitted in network even if you dont want to display at the time.

Send image via json in android

Hi I am working with android.I want to send an image from server to android and I had done it with sending url from server.How can I send an image from server to android app via json?? is it possible??
It is possible if you can convert your image at your server to a Base64 encoding string. Then you can send the string to your app via JSON.
You can use Apache Common IOUtils:
Base64.encode(FileUtils.readFileToByteArray(imageFile));
On your app you can convert the string to image, example in this link
How to convert a Base64 string into a BitMap image to show it in a ImageView?
Hope that helps
It is possible to send binary data within Json but you have to escape the binary data (UTF-8 encoding and use Base64.) This will increase the data size. Why not just include the path in JSON and fetch/load it?

Android: How to send a picture through a service

I wonder how is it possible to send a picture.
I am using json to send data and store to database.
But how do I handle a picture?
How do I send it using json?
Look at this:
How to send an image using json to server in iPhone?
Have a look here, shows how to use HTTP with Java:
http://www.java-samples.com/java/POST-toHTTPS-url-free-java-sample-program.htm
Never send bytes, encode it with base64 and compressing does not really help.

Categories

Resources