Upload image from android phone to the Asp.net server - android

I searched many links but not able to find the solutions. As i dont have much idea about coding Asp.net . Can any one help me about the procedure with example to upload a image from the imageview to the Asp.net server.
thanks in advance

I used the same way as in JME.check this. Uploading images is done through HTTP post and
multipart/form-data content type which is accepted by all server side languages, so it should work in ASP.NET in the same was as it works in PHP.

Related

How to send multipart/form-data by using socket.io?

Earlier I was using base64 string for image encoding and sending to node.js server by using socket.io . But after referring some questions I came to know that base64 format is inefficient as it increases the image size by 33% . So, is there any way to transmit data through socket.io by multipart/form-data or something like that.
Actually I'm a beginner in this multipart/form-data concept so please do excuse me if my question is foolish.
I would rather use Firebase or Retrofit for multipart image uploading to server.

Images of a node server won't be shown in my app

I'm trying to open the following image in my android app using picasso for imageView, but it is not displaying:
https://www.mesannuairesvideos.com/uploads/file-1491574016406.jpg
However, i can open it from any browser (whether on mobile or on computer).
Am sure of my picasso method cuz it works perfectly with other urls, my problem is that images in that server are displayed on browsers and won't be shown in android applications.
Could anyone try to include this image in an android test application.
Can anyone test it for me please.That would be so helpful
Kowing that images are on a remote server.
Any help would be appreciated. thanks :)
The problem you're facing have to do with the part S from your protocol (i.e. httpS - the image you are trying to open is behind a secure connection). Picasso has a flaw dealing with secure connections. But you have workarounds. See this: https://github.com/square/picasso/issues/500
Not working for me too!
I using this code:
Picasso.with(context).load("https://www.mesannuairesvideos.com/uploads/file-1491574016406.jpg").placeholder(R.drawable.placeholder).into(holder.mPhoto);
I had this issue too. So this is how i have done
Node JS Code.
_app.get('/services/user/:photo, function(req, res){
consoles.log('Loading picture -> '+req.params.photo);
res.sendFile(_path.resolve('./upload/_profile/'+req.params.photo+'.jpg'));
console.log('./upload/_profile/'+req.params.photo+'.jpg');
});
Android code is here
Picasso.with(mContext).load(url).error(R.mipmap.ic_launcher_round).placeholder(R.mipmap.ic_launcher_round).into(viewHolder.icon);
Your url does not work try with this url https://netic-news.net/upload/_article/156.jpg
I'm waiting for your feedback!

Extracting image from html in Android

I am able to parse html content using HTMLCleaner & able to populate in list view. But extracting image I ma facing problem. while I am able to get images from any web server, i am not able to get same from my local Apache http server.
I want to know the reason & possible solution.
Thanks in advance.
It seems like the phone (emulator?) doesn't have access to your local server.
Use the browser in the phone/emulator and try to access your server just to make sure if it's this problem.
If you have access, print the url and make sure everything is alright.

How to image upload in Amazon s3 webservice using android?

I need big help from you,I want to upload image using amazon s3 web service.I got bucket name,access key,secret key,I need help with How to implement code for upload images in amazon s3,i need sample code for that..
Thanks Friends
You will find the details here,
http://aws.amazon.com/articles/4225549089557252
http://jets3t.s3.amazonaws.com/toolkit/code-samples.html
And also check these,
http://aws.amazon.com/articles/1434
http://www.lysesoft.com/products/s3-bucketupload-android/
http://aws.amazon.com/sdkforandroid/
http://aws.amazon.com/sdkforandroid/faqs/

Upload image from Android to WCF service

I'm looking for a complete example for uploading an image + some text fields from Android to a WCF service. I've been searching for days without finding any useful examples. What I need is the code for both the client and server.
I've been able to make it work with JSON and Base64 encoding the image as a string, but this is way too slow with images around 500KB. What I'm looking for has to be efficient. Probably using a stream.
Can anyone please give me a complete sample code? I've seen a lot of snippets on each side, but not a complete sample. From getting the image from a path on the phone to posting it to the server and consuming it on the server in C#? How to get the image as a bytearray on the server and the text into string variables?
Thanks for listening.
For setting up WCF streaming on the server side see : http://msdn.microsoft.com/en-us/library/ms789010.aspx
You could also try just using basic http binding and MTOM.
For the android part you will need to get help from someone else, sorry.

Categories

Resources