Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Uploading files
Message
 
À
11/02/2003 07:04:58
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00751826
Message ID:
00752555
Vues:
31
This message has been marked as the solution to the initial question of the thread.
If you're using VFP, it's fairly easy to load up the ASP Request.BinaryRead object.method from within VFP to do the upload from a VFP mtdll called from ASP. You can see it in action at:
http://www.activevfp.com/AVFPdemo2/default.asp?action=upload1
Here's some code:
FOR lncount = 1 TO (N/THIS.lnchunksize)
	READSIZE=THIS.lnchunksize
	laBlob1=oRequest.BinaryRead(READSIZE)
	IF llProgress
		THIS.updateprogress(oProp.TempName,READSIZE,N)
	ENDIF
	IF VERSION(5) < 7 
		FOR lncount2 = 1 TO THIS.lnchunksize
			lcInput=m.lcInput+ CHR(laBlob1(lncount2)) &&slows things down!!
			Sleep(THIS.lnCpuSleep)
		ENDFOR
		STRTOFILE(lcInput,oProp.TempFile,.T.)
		lcInput=""
		RELEASE laBlob1
		DIME laBlob1[THIS.lnchunksize]
	ELSE
		Sleep(THIS.lnCpuSleep)  && allow processor to do other things
		STRTOFILE(laBlob1,oProp.TempFile,.T.)
		lablob1=""
	ENDIF
	bytesread=bytesread+READSIZE
NEXT
READSIZE=N - bytesread
IF READSIZE <> 0
	laBlob1=oRequest.BinaryRead(READSIZE)
	IF llProgress
		THIS.updateprogress(lcTempName,READSIZE,N)
	ENDIF
	IF VERSION(5) < 7 
		FOR lncount = 1 TO READSIZE
			lcInput=m.lcInput+ CHR(laBlob1(lncount)) &&slows things down!!
			Sleep(THIS.lnCpuSleep)
		ENDFOR
		STRTOFILE(lcInput,oProp.TempFile,.T.)
		lcInput=""
		RELEASE laBlob1
	ELSE
		STRTOFILE(laBlob1,oProp.TempFile,.T.)
		laBlob1=""
	ENDIF
	bytesread=bytesread+READSIZE
ENDIF
IF FILE(oProp.TempFile)
	lcInput=FILETOSTR(oProp.TempFile)
	DeleteFile(oProp.TempFile)
ENDIF
>Hi
>
>I would like the facility for a user to up-load a file to my web-server.
>
>Does anyone have any examples in VB/Java script?
>
>Thanks
>Kev
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform