Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai everybody,

Good Evening to all...

i have been developing window application to upload files.currently i am using ftp to upload. can anyone suggest code to upload and send file through http's?

thanks in advance..
Posted

Hi Jai,

I did a search for you and got this !

Check it out.
 
Share this answer
 
Comments
jai_mca 30-Nov-12 1:38am    
Thank u so much dear VitorHugoGarcia,

this is very useful to me.but i have one question.i have public ip for https.instead of hostname is it possible to use that ip?if it is possible means when i enter that ip in browser address bar it need to open na?
_Vitor Garcia_ 30-Nov-12 4:25am    
I guess you could just change https://someSecureTransferSite.com/directory to https://102.52.52.58:443/directory being 102.52.52.58 changed for your public ip. 443 is the standard port for https.

Just give it a try and report here the result please.

PS - What do you mean by "na" ?
jai_mca 30-Nov-12 5:08am    
thanks again..i have tried like https://122.183.243.40/DATA.but it prompt the error like below.
"unable to connect the remote server"

PS -sorry,na means know?.i write it like speaking to directly
jai_mca 4-Dec-12 2:02am    
i just wanna upload file to the above ip.i have developed window application for that.now my problem was how do i pass the ip?? before that i used ftp to upload.in ftp we can open manually and able to check.but in https how is it possible.i am totally confused.plz clear my doubt. thanks in advance
You can send it HTTP Request
You would need to do a "POST"
You need to encode the file as a string or binary

http://msdn.microsoft.com/en-us/library/d4cek6cc(v=vs.100).aspx[^]
 
Share this answer
 
v2
Comments
jai_mca 30-Nov-12 1:55am    
Thank u so much dear Mathlab, this is very useful to me.but i have one question.i have public ip for https.instead of hostname is it possible to use that ip?if it is possible means when i enter that ip in browser address bar it need to open na if it is correct means?
[no name] 30-Nov-12 8:28am    
any valid web address or valid ip can be put in your uri variable
jai_mca 3-Dec-12 4:43am    
thanks again..i have tried like https://122.183.243.40/DATA.but it prompt the error like below. "unable to connect the remote server".

Is it possible to connect the remote server manually using that ip address?
[no name] 3-Dec-12 12:03pm    
The solution I suggested requires a server application to recieve the information on the other side, becasue of the "POST". so you have to have a web page to send your post on the other end.
jai_mca 4-Dec-12 2:01am    
i just wanna upload file to the above ip.i have developed window application for that.now my problem was how do i pass the ip??
before that i used ftp to upload.in ftp we can open manually and able to check.but in https how is it possible.i am totally confused.plz clear my doubt.

thanks in advance

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900