"Filename: (upload failed)" - Problem with AJAX ?

Hello there,

I have tried to solve the problem below together with the official SC support for almost one month now. So far, there was no success. Perhaps there is someone in this Forum who can give advice:

The problem:

I realized that forms which contain “Document (File Name)” fields can not be updated properly on the Web server (Linux). When I want to UPDATE a record by uploading a document to it, I always receive the error “Filename: (upload failed)” --> See screenshot.

The strange thing is that it is possible to ADD a NEW record together with a document attached. However, UPDATING the same record by replacing the existing document with a new one causes the error after clicking on “Save”.

So far, SC support staff has advised me:

  • To change some file/folder permissions on the Web server,
  • To install ZEND and JRE on the Web server (which actually is not required for production)
  • To modify the php.ini file.

Nothing has worked so far. I still receive the same errors when trying to upload documents to existing records. Finally, I contacted the support department of my Web server. The response I have got from them was this:

[Quote:
It appears to be due to the way in which the script handles the uploading in the update records through AJAX, if you can have this changed to non-AJAX in this interface it should function.”]

So, does anyone in this Forum know how to disable AJAX when updating a record? Or does anyone have another workaround to solve that problem?

I am pretty much at a loss.

Thank you in advance and kind regards
Gustav

document_error.jpg

Re: “Filename: (upload failed)” - Problem with AJAX ?

Try to have a look at:
http://www.scriptcase.net/forum_en_us/index.php?topic=6122.msg15536#msg15536

This is my solution but I’m not sure it will be also the yours.
Bye
Giovannino

Re: “Filename: (upload failed)” - Problem with AJAX ?

Thank you Giovannino.

I have tried to apply your solution and established the subfolder as proposed. Unfortunately, it did not help. I still can not attach documents to existing records on the Web server (Linux). The system always shows the error. Strangely enough, on my localhost environment (Windows Vista) everything works fine - even without having subfolders.

Maybe it is true and the Scriptcase script on the Linux-based Web server can not handle uploads and updates of records through AJAX.

Still looking for a solution.

Thanks again and kind regards
Gustav

Re: “Filename: (upload failed)” - Problem with AJAX ?

Hi Gustav,

     Your code is correct. Check the folder permission in linux. 

 check lib (folder) -> file -> subfolder (dynamic folder). Check the Permission( Readwrite, owner name, group name).

   same as other folder permission (owner name , group name).

Re: “Filename: (upload failed)” - Problem with AJAX ?

Thank you Fuint. I tried your solution but it was neither working. However, finally, we were able to solve the problem:

The application was giving 403 forbidden error by AJAX which could not be seen from the browser. We figured out that the problem was related to the “tmp” folder.

So, the solution was: While deploying the application in Scriptcase, we selected the “advanced” option and set the temporary file folder to something different from “tmp” (in our case we just used “temp”).

After uploading the system onto the Linux server everything worked fine. Interesting that problems which sometimes seem to be so difficult can be solved that easily.

Thanks again and best regards
Gustav