Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File Transfers to a Web Site
Message
From
17/05/2004 15:02:46
 
 
To
17/05/2004 13:28:08
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00902945
Message ID:
00904665
Views:
41
Mike,
Same what I told you before. I will comment your code... look yourself..
Some my lines I selected with >>>>>>>> string. If you want send me email and I send you complete valid code

>***********************************
>** CLIENT SIDE
>O=CREATEOBJECT('wwIPStuff') && Ok
>LCFILETEXT = O.ENCODEDBF("acctemp.dbf",.T.) && Ok. Now have encoded buffer
>lcfilename = "ACCTEMP.DBF" && Wrong. Why again acctemp.dbf?
>>>>> lcfilename = ADDBS(SYS(2023))+SYS(3)+".dat" && Create template encoded file
>>>>> STRTOFILE(lcfiletext,lcfilename) && dump the encoded file to disk

>O.NHTTPPOSTMODE = 2 && multipart forms && Ok
>O.ADDPOSTKEY("CustFile", lcfilename, .T.) && Ok
>LCBUFFER= "" && Ok
>LNSIZE = 100000 && Might be initialized with 0
>LNRESULT = O.HTTPConnect("www.doncasteroffice.net", "Mikes", "Mikes123" )
>LNRESULT = O.HTTPGETEX("www.doncasteroffice.net/rentmast/wc.dll?http~rentproc~Upload", @LCBUFFER,@LNSIZE)
>O.HTTPCLOSE()
>


>** Server Side
>****************
>FUNCTION UPLOAD && (part of rentproc)
>****************
>LCFILENAME = "acctemp.dbf" && Wrong place for difinition.. on next line it will have new value becase @lcFILENAME)
>LCFILEBUFFER = REQUEST.GETMULTIPARTFILE("CustFile",@LCFILENAME)
>>>>>>>>>lcFilename = addbs(sys(2023))+"acctemp.dbf" && Place it here
>
>O = CREATE("wwipstuff")
>if O.DECODEDBF(LCFILEBUFFER,lcFilename)
>ELSE
> THIS.STANDARDPAGE("Upload Error","Acctemp Not Found")
>ENDIF
>

* Another way to check it
lcFilename = Space(0)
lcFileBuffer = Request.GetMultiPartFile("CustFile",@lcFileName)
IF LEN(lcFileBuffer)>0
File2Var(lcFileName,lcFileBuffer)
ENDIF


>ENDFUNC
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform