File data not available in File Service upload event handlers

Currently, the file data itself is not available in the upload event handlers. In order to implement, for example, encryption/decryption of posted files, I need access to the file data, preferably the stream, in those event handlers.

Hi Kim,

If you do it in the “after” handler, then you would be able to grab the original file from the URL (since it would already be saved by then). The code could do whatever modifications needed and then save the file back (via upload because you do not have access to the local file system).

Hope this helps.

Regards,
Mark

Hi Mark,

Unfortunately that doesn’t help. I can’t save the unencrypted file first, or my solution will not pass the mandatory penetration test requirements. It needs to be encrypted ‘on the fly’ during save, and it has to happen server-side…

Maybe I can use a custom API service for this, I just discovered that option (still learning about Backandless here…). I will try, but still it would be nice if it made it into the File Service itself.

Regards,
Kim