You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you upload a file via URL on the frontend you have to manually call your backend if you want to react there to this event.
We could have a hook/callback in the SDK that automatically creates these sandbox-related notifications.
This hook could be either an instance or class method:
As instance method — requiring you to have a sandbox connection:
sandbox.filesystem.onFileUpload((path)=>{})
This could be implemented via watchDir functionality relatively easily.
As a class method — this would allow you to have the hook without a sandbox connection:
Sandbox.onFileUpload(sandboxID,(path)=>{})
Implementing this is noticeably harder — it would require us to have a notification system/infra and changes to the envd to allow forwarding events to this system.
The current solution is for example to call the server from the frontend after POSTing to the fileURL, or POSTing to the server and calling sandbox.uploadFile from there.
The text was updated successfully, but these errors were encountered:
When you upload a file via URL on the frontend you have to manually call your backend if you want to react there to this event.
We could have a hook/callback in the SDK that automatically creates these sandbox-related notifications.
This hook could be either an instance or class method:
This could be implemented via watchDir functionality relatively easily.
Implementing this is noticeably harder — it would require us to have a notification system/infra and changes to the
envd
to allow forwarding events to this system.The current solution is for example to call the server from the frontend after POSTing to the fileURL, or POSTing to the server and calling
sandbox.uploadFile
from there.The text was updated successfully, but these errors were encountered: