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.
harineeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MikeP090797Commented:
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
0
DefTonesCommented:
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
dadedadeda

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

Deftones


 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.