Page 1 of 1

JQFileUpload not working on ISAPI/Apache

PostPosted: 26 Jan 2015 22:47
by kmccoy
TIWFileUploader works on ISAPI + Apache, but TIWCGJQFileUpload does not.

For a test, I put both of them on the same form/region and tried dropping some files on them. The old TIWFileUploader correctly copies the files to the designated web server folder (and looks awful). TIWCGJQFileUploader shows the uploaded file name in the browser but fails to actually copy the file to the designated directory. It does look nice. :-) Wireshark shows an error message returned by the server when using the IWCGJQFileUploader component.

Both components used the same upload path, so it is not a directory rights problem.

Here is my test project:

https://www.dropbox.com/s/wzyso6tcoii513z/ULtest.rar?dl=0

I am using CGDevTools v2.5.0.13, IntraWeb 14.0.36 Ultimate and DXE UD1.

Your help would be greatly appreciated!

Re: JQFileUpload not working on ISAPI/Apache

PostPosted: 27 Jan 2015 12:59
by Alexander Bulei
Hi kmccoy,

1st. The file is corrupted.
2nd. Checked and works as expected in localhost and our demo online.

Best Regards.

Re: JQFileUpload not working on ISAPI/Apache

PostPosted: 27 Jan 2015 16:32
by kmccoy
Alexander Bulei wrote:1st. The file is corrupted.


No, it isn't. :-) There is a new version of WinRAR that compresses smaller with the RAR5 algorithm - you have the old one. The new one is a free upgrade.

I Zipped it this time:

https://www.dropbox.com/s/uu130sxmqnyrfsc/ULTest.zip?dl=0

2nd. Checked and works as expected in localhost and our demo online.


Yes, I know it works fine on standalone.

The problem is on ISAPI + Apache. Maybe I am doing something wrong with the properties for the JQFileUpload component that makes it appear as if the file is uploaded, but it is not actually saved.

I have tried using relative URLs, fully qualified URLs, Etc for the UploadPath property. Nothing seems to work on ISAPI. I tried using normal disk file paths - that works on standalone, but not ISAPI.

The old AtoZed component works fine on both standalone/ISAPI.

Re: JQFileUpload not working on ISAPI/Apache

PostPosted: 27 Jan 2015 16:41
by Alexander Bulei
Hi,

Our demo online is ISAPI...

Re: JQFileUpload not working on ISAPI/Apache

PostPosted: 27 Jan 2015 16:58
by kmccoy
Alexander Bulei wrote:Our demo online is ISAPI...


Apache? IIS?

Did you look at my source? Am I doing something wrong?

Re: JQFileUpload not working on ISAPI/Apache

PostPosted: 27 Jan 2015 17:11
by Alexander Bulei
IIS

Re: JQFileUpload not working on ISAPI/Apache

PostPosted: 27 Jan 2015 17:32
by kmccoy
Did you look at my source? Am I doing something wrong?

Re: JQFileUpload not working on ISAPI/Apache

PostPosted: 27 Jan 2015 18:37
by Jorge Sousa
Hello Kevin

When I debug your app, this exception is raised.

---------------------------
Debugger Exception Notification
---------------------------
Project w3wp.exe raised exception class EIWCGJQuery with message 'In order to operate FileUpload in IW14/ISAPI, you have to include unit IWCGHttpApp in your IW project!'.
---------------------------
Break Continue Help
---------------------------

Please add the file IWCGHttpApp.pas or IWCGHttpApp.cpp/IWCGHttpApp.h to your project.

These files are installed in cgdevtools installdir\SourceDist

Re: JQFileUpload not working on ISAPI/Apache

PostPosted: 27 Jan 2015 19:55
by kmccoy
Jorge Sousa wrote:Hello Kevin

When I debug your app, this exception is raised.



Strange! I do not see that exception.

Please add the file IWCGHttpApp.pas or IWCGHttpApp.cpp/IWCGHttpApp.h to your project.


Perfect! That fixed the problem. Under what circumstances do I need to manually add this unit?

Re: JQFileUpload not working on ISAPI/Apache

PostPosted: 29 Jan 2015 11:25
by Jorge Sousa
Hi

About

Strange! I do not see that exception.


Only debugging the web app you will be able to notice the exception, or reading browser console.

Please add the file IWCGHttpApp.pas or IWCGHttpApp.cpp/IWCGHttpApp.h to your project.


Under any circumstance, if you need to use IWCGJQFileUpload