SyncsnapUploadButton
SyncsnapUploadButton is an all-in-one component: a button that opens a dialog with a QR code. When the user clicks the button, a job is created and the QR code is shown; the hook then calls your backend’s wait endpoint (the server polls until the job completes or fails). When done, your onCompleted(job, result) runs with the server’s result.
Basic usage
onCompleted(job, result) receives it (e.g. a custom payload from your server’s onCompleted callback or the presigned download URL).
Props
All useSyncsnapJob options are supported (e.g.createJobUrl, getJobUrl, getWaitForCompletionUrl, waitTimeoutMs, waitIntervalMs, onCompleted). In addition:
Callbacks
Pass the same callbacks as useSyncsnapJob:Custom API paths
If your API is not under/api/syncsnap/job: