Server-Side scripting on file upload not triggered in v2

Hi guys,

On image upload I am using a server-side script to generate a thumbnail and different sizes of the image uploaded.
After migrating to version 2.0.1-1, after the upload the server-side script is not triggered anymore.

I have tried both pre and post process (the snapshot is for “files.{folder_path}.post.post_process”) but it seems that this feature is not there anymore.
Event based scripting is working for the other services, but not for the file service. I have tried both on my hosted environment (ubuntu 14.0 x64) and on the 1 hour AWS demo.

Maybe I do something wrong. Any advice would be greatly appreciated.


1 Like

I’m having a similar issue for file/folder downloads. var_dump doesn’t work, etc… I don’t want to step on bitperbit’s toes here, but mine’s for slightly different use case concerning overwriting event.request_path.

1 Like

No harm done :smile:
Actually you gave me a hint on how to include the thumbnail in the response. If I can make it work again.

The alternative is to create a custom service for file upload and download.

Any updates on this? Do the developers know it to be an issue? I see debug messages in the logs about pre and post processing events for many other resource and service events (api_docs, system, mysql, db, user, etc) but nothing for files, and none of my attempts to create a file pre or post processing script have worked.

Filed as a bug. Waiting to be added to a sprint.

1 Like

I’m having same problem on version 2.2.1. Isn’t it fixed?