uploading image file to server - android

I try to find way to send picture from android gallery to online database server such as mySQL , but I think I should upload this IMAGE file first to server after that getting the direct image link and send this link to database mysql
any one have simple idea about that ?

You could for example encode the image in Base64, and then send it to your backend parsed as JSON via rest webservices, and store it in a BLOB field.

Related

Recover an image from an android to send to server

I am currently working on an android application and I would like to add a file system to send images. But I don't know how to get an image from the local storage of an android, nor how to send it to a server. I am currently using a flask server to retrieve JSON files, and I don't know if retrieving images would be possible with this kind of server.
Would you have any clue how to retrieve a file on a button press and send it to a server please?
You can use this library to pick from local storage and upload it to the server with ease
https://github.com/gotev/android-upload-service
At this point, it doesn't matter what server you use as long as you can retrieve data.
You can do it using Retrofit. For detailed instruction, check This medium post!

Upload image from android app , save it to sql sever

i want to build an andoid app , which will upload the image to sqlserver
i know how to save using ftp server,but i dont want to do in that way
is there any way that i can save directly to sql server
Thanks for your time guys
If you really need to save files in the database SQL server has a column type varbinary for saving BLOB objects.
http://msdn.microsoft.com/en-us/library/ms188362.aspx
You can do it by BASE64 encoding, you will obtain a string that you'll can store it into a TEXT field in your SQL DB.
And when you want to read or view the image, you'll have only to decode the string.
Here I give you a very good tutorial of how to encode

Receive image and save in database-django view

I'm working on an application where the client side is android and the server side is django. I usually send data to the server using post requests and recieve them at the server side in this way
e.g. name = request.POST['name']
I need now to receive the image in the server side and save it to the database. The image was converted at the client side(android) to base64 string so how can I convert that string to image at the server side and save it in the database?!
Any help?!
Have a look at a similar question, found here. If you do this, then you can just save the reference to the database for the image, or save the base64 string to the database.

Image Upload Using .net Webservices

I am Developing an Android Based Application. I am Using .net webservice to upload the data. Here I am successfully able to upload all the data except Image Byes. I want to know how to send Image as Binary array to the .net webservice.
I think you can convert images in the Base64 string and then its easy to upload string on the server.
Just check this question for code of Converting image to Base64 string

How to upload image from Android device to Rails server?

I am working on a Android project and want to upload Bitmap images to my rails server. But I have no idea how to write the Rails models or controllers.
I find someone using MultipartEntity post to upload images and paperclip to recieve images on RoR server. I want to know how to connect the post and server (what url?) and how to write the model or controller.
I use a stupid method. I convert the Bitmap image to byte array and use Base64 method to convert it to a string. Post the string to server. When I want to get image, download the string and convert it to Bitmap.

Categories

Resources