Server-Side scripting on file upload not triggered in v2


#1

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.

Thanks
Gabriel


#2

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.


#3

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.


#4

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.


#5

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


#6

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