uploading a file from client to server

I would like to know if I can upload a file from my vb application in the client to the server.IF SO, HOW?
I would be using a coldfusion application server.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

DefTonesConnect With a Mentor Commented:
If you are using TCP/IP to upload to your server, have the server recieve data regognizably,so say if the client was sending  a file thru, you could detect it likle this
if instr(1,datacomingin,"{FILE}") then

if you know howto use tcp/ip use the mswinsock control and do this for your server
Private Sub Winsock1_DataArrival(BytesTotal as long)
dim Buffer$,pos as integer,fileisopen as boolean
winsock1.getdata Buffer$,vbstring
if instr(1,buffer$,{EOF}" then close #1                            'close file if client tells                                                                                         'us its the end of the file

if fileisopen = false then
     if instr(1,buffer$,"{FILE}" then
        buffer$ = right(buffer$,len(buffer$) - 6)                         'take {FILE} out of data'
        open "FILETOSAVEAS" for binary access write as #1
        fileisopen = true
     end if
elseif fileisopen = true then
       put #1,,buffer$
end if

==========and make the client do this==========
dim take$:take = string$(10000," ") 'make space for get procedure
winsock1.senddata "{FILE}"             'notify server a file is about to be transfered
open "FILETOSEND" for Binary access read as #1
do while not eof(1)
get #1,,take$                                  'takes 10000 bytes
winsock1.senddata take                  'puts 10000 bytes into send buffer
                                                     'you can modify size in the top 'String(10000
                                                     '," ") statement to make send buffer smaller

good luck


Assuming you are talking about HTTP server, use the HTTP PUT method along with the Internet Control. There is an example on how to do it in the Internet Control help
All Courses

From novice to tech pro — start learning today.