Strange error during invoking post.post_process script


#1

Hi,
During uploading file to S3 (this works ok), system gives me error:

POST https://localhost:8880/rest/s3/dreamfile/ 500 (Internal  Server  Error)
Dream_app:502 {"readyState":4,"responseText":"{\"error\":[{\"context\":null,\"message\":\"Exception executing javascript: s3.dreamfile.post.pre_process.js:63: SyntaxError: Unexpected token ;\",\"code\":500}]}","status":500,"statusText":"Internal  Server  Error"}

but I don’t have any additional semicolon.
For test purposes I added to script only single line:

var test;

I suppose this is system error, because

s3.dreamfile.post.pre_process.js:63 

and I have only one line in my code.


#2

I have created the same post.pre_process script on a file storage service and can’t get the same result.

Are you certain you’re editing the right script file? You mentioned s3.dreamfile.post.post_process.js is just a single line, but the error message indicates line 63 of s3.dreamfile.post.pre_process.js.


#3

I get the same(very similar error) when I add either a post.pre_process or a post.post_process script. I have less than 10 lines of code.

Here is the error from the web.*.log file:

[ERROR    ] REST Exception #500 > Exception executing javascript: files.applications.post.pre_process.js:63: SyntaxError: Unexpected token ; {"host":"192.168.0.14:8080","request_uri":"/rest/files/applications/app/?check_exist=false","source_ip":"192.168.0.11","sapi_name":"apache2handler"} 

Some background:
I am trying to upload files via the files api and the android sdk. without the scripts, file uploads of any kind are successful. However, pictures(.jpg) files result in the above error when either script type is enabled. I have not tried other image formats.

After doing some troubleshooting, I realized that the contents of the script did not matter. Having even empty scripts caused .jpg uploads to fail with the same exact error above.

Any solutions/workarounds?

Thanks!