As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Trigger some code after file has been stored, from BL
D
Davide Neri
started a topic
about 10 years ago
I want to trigger some code after a file has been stored...
I've seen the new collection hook for Files and I tried placing the code in onPostSave().
The code gets triggered when the first response comes from Google server, with the upload address and the other details... but at that stage the file still has to start the real upload.
Is there a function that is triggered at the end of the upload, where I can put my code?
Otherwise, can I add a listener to the file upload process and let it trigger the function at the end of the upload?
I know I can do this client-side ....but it would make things easier to do it server-side.
Hi Davide, unfortunately it is not possible to do this server-side. Kinvey's service is not involved in the upload itself, so we don't know when it finishes, however you can have the client trigger the server code as you mentioned.
D
Davide Neri
said
about 10 years ago
Thanks Ivan, okay... I'll go for the client then.
Actually, since what I have to do is to call an app engine service to process the uploaded file, I'll try to see if there's a way to handle things from there... maybe with a timeout function trying a few retries till the file is fully uploaded, and the processing it.
Not a very elegant solution :D I'll think more into this.
Davide Neri
I've seen the new collection hook for Files and I tried placing the code in onPostSave().
The code gets triggered when the first response comes from Google server, with the upload address and the other details... but at that stage the file still has to start the real upload.
Is there a function that is triggered at the end of the upload, where I can put my code?
Otherwise, can I add a listener to the file upload process and let it trigger the function at the end of the upload?
I know I can do this client-side ....but it would make things easier to do it server-side.