Skip to main content

I see that box allows me to upload a folder containing multiple files. Is there any way to do that all the files in the folder have been uploaded, I am looking at webhook but could not utilize this event because FOLDER.CREATED is issued before all the files have been uploaded.

Hi @user89



Can you elaborate on your use case a bit more?



If I understood correctly you want to detect that when a complete folder upload terminates.



Can you tell me what tools and SDK’s are you using?



There is no end point on the API to upload a folder, so I’m wondering if you are trying to monitor when a user drags and drops a folder into the box app or the upload UI Element.



These will produce a series of individual events from the folder creation to each file upload, but I don’t think a final event of all uploads completed gets triggered.



Let us know what are you trying to do with this so we can investigate a possible solution.



Cheers


Thank you for your reply. Our customer is using BOX in a browser. A customer stores multiple files to give us in a folder and uploads them by dragging and dropping. We would like to detect data uploaded by customers using webhooks and automatically analyze it using our system. I am having trouble because there is no webhook that can be used for this use case. We are thinking of waiting several minutes after receiving FOLDER.CREATED and then downloading all files in the folder from our system using API, but this is not an ideal method. Depending on the customer’s network environment, uploading may not be completed even after the specified time has passed, and above all, there is a significant delay before the analysis results can be viewed.


Hi @user89





Where? Is this inside the box.com app or are you using your own web app and the uploader UI Element, or something else?



For example the Content Uploader UI Element fires a JS event when all uploads in the current view are complete. You could then use this to trigger your process.



For the traditional web-hook approach all you have is the FILE.UPLOADED, which will fire for each file uploaded, and of course the backend won’t know how many files to expect.



If you are building your own app, you could trigger your process when all files have been uploaded, if you have your own upload method, something like a recursive folder upload.



Let us know



Best regards


It is the box.com UI, not a proprietary web app.



As long as we use the box.com UI, there is no way to know when all uploads are complete when we upload a folder containing multiple files.


Hi @user89



I do not see a way, no.



The server has no idea when the last file is uploaded, only the client would.



However and in order to explore more possibilities, tell me about the way you request these uploads to the users, and then what happens after that.



I’m wondering if creating some sort of file queue could do the trick.



Cheers


Reply