How to upload image using HttpWebRequest or anything else plus I have to display results from the website in my application. Please help...
There's an example of how to do this which include for both the client and server at
http://chriskoenig.net/2011/08/19/upload-files-from-windows-phone/
You can use WebClient.FileUpload to upload images
Related
I'm using LiveSDK in C#. Is there any way to get an URL (for example, url like this: https://onedrive.live.com/embed?cid=1ED5694B634A1579&resid=1ED5694B634A1579%21685&authkey=ANQwPScWiCxbILY) for a specified image file in order to put this link directly to the Image (Source property) control?
I dont want to download a Stream from OneDrive file, set it to a BitmapImage and put it to the Image control.
I know that OneDrive web app allows to create an URL for a selected file, but don't know if the SDK has such feature.
There is a very good example in MSDN Samples Page showing how to pull and use images from OneDrive.
Photo Sky SampleThis sample demonstrates how to use the LiveSDK for pulling images from SkyDrive. In this sample you will learn how to use LiveSDK and request consent from the user to access his SkyDrive files and display the images in a Metro style application.
Source: PhotoSky - SkyDrive Sample
I am developing a Google Drive application for Windows Phone using URLs provided in the SDK through HTTPWebRequest. Is there an API for WP8 to develop Google Drive applications?
I downloaded all of the content without any problem. While I am uploading the MIMEtype, it is not always uploaded correctly, and is uploaded as an octet stream.
Please can anyone help with how to upload to Google Drive using C# code?
Thanks
Check the "Upload Files" section of the Google Drive SDK :
https://developers.google.com/drive/manage-uploads
i got solution, actually i am using string[] HeaderKeys = { "X-Upload-Content-Type" }; string[] HeaderValues = { "application/vnd.google-apps.folder" } for post method,
here i used request.contentType in the place of X-Upload-Content-Type now i am uploading all files with correct stream.
,Hope i get this clear.
I have a asp.net website, as part of it i generate a bitmap and need to save it some were so i can display it later on.
for now my sites is locate here:
http://tools.myDomain.com/mySite/
I have created a directory with in my site:
http://tools.myDomain.com/mySite/img/
Now i am trying to save my bitmap to there like this:
bitmap.Save(#"http://tools.myDomain.com/mySite/img/bitmap.png");
I can get this to work, not from my computer locally and not when i do Publish to my site...
Any ideas how can i fix this problem?
Thank you
You need to save it on the server not on the web
bitmap.Save(HttpContext.Current.Server.MapPath("/img/bitmap.png"));
try
bitmap.Save(Server.MapPath("/mySite/img/bitmap.png"));
Or you can use an absolute path
bitmap.Save("c:\inetpub\wwwroot\mySite\img\bitmap.png");
Note that the path is just an example and should be your absolute path.
You need to add permissions for ASPNET user. It will work for sure.
I am trying to upload an image using ASP.NET with C#.I do not how to send image in parameter
source="F://sample.jpg".I have also tried to send an image in a byte format.
URL is
http://graph.facebook.com/album_id/photos?access_token=access_tokenvalue;
Post Data is
source= "F://sample.jpg"
I am getting an exception.Please help me to sort out this issue.
Thanks in advance.
Could you post the error message you're getting? Might be helpful in tracking down exactly what the error is. In any case, I'm not too familiar with the Facebook APIs but it appears in the Graph API document for Photo that you have to prefix the file path with an #.
source="#F:\\sample.jpg"
Dear friends
I have a console application in which i want to first sign in and then I press button which directs me to file upload form .In file upload form I want to upload a csv file and then redirect to next form after clicking submit button then i want to get response of that form .
can any one help me to do this from C# console application?
thanks.
if you want to upload a file on a website from a console application,
then you should have information about FTP credentials.
If you want to do a real http-transfer you need to create a http request, I looked around a little bit and found this: Upload files with HTTPWebrequest (multipart/form-data), seems to be right. I'm doing something similar in python currently.