Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File Transfers to a Web Site
Message
From
15/05/2004 05:41:20
 
 
To
14/05/2004 20:15:12
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00902945
Message ID:
00904295
Views:
31
Mike,
Where in code you create file (lcFilename). In the code you just declare filename . I thinking you forget next STRTOFILE() and wrong addpostkey:

lcFileText = oHttp.EncodeDbf("c:\temp4\acctemp.dbf',.t.)
LCFILENAME = ADDBS(LCTEMPPATH)+SYS(3)+".txt"
nBytes = STRTOFILE(lcFileText,lcFilename)

Because lcFileText - its binary string as result encoding of DBF. Then you must write
OHTTP.ADDPOSTKEY("acctemp",LCFILENAME,.T.)
here "acctemp" is key name.. no binary data

Denis


>Denis:
>I have attempted to model my code after yours as below.
>
>The code falls apart on the line
>OHTTP.ADDPOSTKEY(lcfiletext,LCFILENAME,.T.)
>and the error message is "File Not Found".
>
>Could you advise what i am doing wrong here.
>
>Mike Smith
>************************
>OHTTP = CREATEOBJECT("wwIPStuff")
>LCFILETEXT = Ohttp.ENCODEDBF('c:\temp4\acctemp.dbf',.T.)
>SET PROCEDURE TO WWHTTP ADDIT
>LCTEMPPATH = SYS(2023)
>LCFILENAME = ADDBS(LCTEMPPATH)+SYS(3)+".txt"
>LCUPLOADURL = "HTTP://www.doncasteroffice.net/rentmast/wc.dll?rentproc~Upload"
>LCADMINPASS = "SomeSecretWord"
>*** Set mode to multi-part form
>OHTTP.NHTTPPOSTMODE = 2
>*** Post a file and a regular form variable
>OHTTP.ADDPOSTKEY(lcfiletext,LCFILENAME,.T.)
>*** Post Admin Pass as variable
>OHTTP.ADDPOSTKEY("AdminPass",LCADMINPASS,.F.)
>WAIT "Please wait... request processing..." WINDOW NOWAIT
>LCHTML = OHTTP.HTTPGET(LCUPLOADURL)
>OHTTP.HTTPCLOSE()
>RETURN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform