# Server-Side scripting on file upload not triggered in v2

**URL:** <https://community.dreamfactory.com/t/server-side-scripting-on-file-upload-not-triggered-in-v2/1853>\
**Category:** Server-Side Scripting\
**Created:** [November 28, 2015, 5:12pm UTC](https://community.dreamfactory.com/t/server-side-scripting-on-file-upload-not-triggered-in-v2/1853 "2015-11-28T17:12:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bitperbit](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/bitperbit/32/490_2.png) [@bitperbit](https://community.dreamfactory.com/u/bitperbit)\
**Post date:** [November 28, 2015, 5:12pm UTC](https://community.dreamfactory.com/t/server-side-scripting-on-file-upload-not-triggered-in-v2/1853/1 "2015-11-28T17:12:52Z")

</div>

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.

 ![](https://canada1.discourse-cdn.com/flex035/uploads/dreamfactory/original/1X/b8420cbe2d6fb8604a136842d4a6f0a11357fefc.PNG)

Thanks  
Gabriel

---

<div class="post-metadata">

**Author:** ![rdubya152](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/rdubya152/32/492_2.png) [@rdubya152](https://community.dreamfactory.com/u/rdubya152)\
**Post date:** [November 28, 2015, 9:31pm UTC](https://community.dreamfactory.com/t/server-side-scripting-on-file-upload-not-triggered-in-v2/1853/2 "2015-11-28T21:31:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bitperbit](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/bitperbit/32/490_2.png) [@bitperbit](https://community.dreamfactory.com/u/bitperbit)\
**Post date:** [November 29, 2015, 9:22am UTC](https://community.dreamfactory.com/t/server-side-scripting-on-file-upload-not-triggered-in-v2/1853/3 "2015-11-29T09:22:10Z")

</div>

No harm done 😄  
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.

---

<div class="post-metadata">

**Author:** ![dao](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/dao/32/458_2.png) [@dao](https://community.dreamfactory.com/u/dao)\
**Post date:** [January 20, 2016, 8:31pm UTC](https://community.dreamfactory.com/t/server-side-scripting-on-file-upload-not-triggered-in-v2/1853/4 "2016-01-20T20:31:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![formerstaff](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/formerstaff/32/1133_2.png) [@formerstaff](https://community.dreamfactory.com/u/formerstaff)\
**Post date:** [January 20, 2016, 8:47pm UTC](https://community.dreamfactory.com/t/server-side-scripting-on-file-upload-not-triggered-in-v2/1853/5 "2016-01-20T20:47:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hedisam](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@hedisam](https://community.dreamfactory.com/u/hedisam)\
**Post date:** [April 19, 2016, 8:49am UTC](https://community.dreamfactory.com/t/server-side-scripting-on-file-upload-not-triggered-in-v2/1853/6 "2016-04-19T08:49:07Z")

</div>

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