Rick,The page loads fine. However, the plUpload component does not display for about 20 seconds. I added breakpoints to the codebehind for the two VFP methods (plUploadSample and OnUploadComplete). However, they never execute. I do not know what specifies the names of the methods executed; however, I just copied the code from your sample.
I changed the extension filter in plUploadSample
loUpload.cAllowedExtensions = "pdf"
However, if I try to add a PDF, I get an error "Invalid file extension: test.pdf."
I can add a JPG and it displays in the list. I click Start Upload. The Start Upload button becomes disabled. Uploaded 0/0 files and nothing happens.
loUpload.cUploadPath = ADDBS(THIS.oConfig.cHtmlPagePath) + "temp"
The application does create PDFs in the same directory. Also, I can use the string upload to upload to that directory.
Thanks,
David
No it's all just script on the client and basic FoxPro code, and it should load instantly. What's slow? Is it the page loading or the server hit(s)...
If nothing uploads check to see whether the requests are hitting the server and step through - to see what's slow. If it's the server it might be permissions failing or Windows redirecting files if you don't have the right write permissions in the folder in questions (UAC). Make sure the IIS application pool account has full rights in the folder you're uploading files to.
+++ Rick ---
Rick,
I downloaded plUpload from the plUpload site, copied your VFP, HTML, and JavaScript code to an app, and tested it. I have a couple of questions. I put the <div> tag on a WC Web page. It takes the plUploader about 20 seconds to display, from the point that I load the page. That does not happen on your sample or on the plUpload page. Is there a configuration setting that needs to be changed?
I can add files, but they do not upload. I see you call CREATEOBJECT. Is there an ActiveX that needs to be registered?
Thanks,
David
FWIW, I've adapted the plUpload ASP.NET code to a Web Connection handler and have added that functionality to Web Connection now.
The FoxPro sample is now online here:
http://west-wind.com/wconnect/webcontrols/plUploadSample.htm
and the documentation can be found here:
wcdocs:_3qj1500yc.htm
I've attached the plUploadHandler implementation, so you can try this out yourself if you like. I'd love to get some feedback.
You can follow the instructions in the How plUploadHandler works topic:
wcdocs:_3qj1bpfln.htm
which should have everything you need.
+++ Rick ---
Hi,
Is there a way to upload files from the client to the WC server, without the 16 MB string limit? I have to upload files, but will frequently have files larger than 16 MBs.
Thanks,
David
![]()