We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The current sample for custom file storage results in an Unhandled Runtime Error. https://docs.unlayer.com/docs/custom-file-storage
Ideally I would like to be able to do something like:
unlayer.registerCallback('image', function(file, done) { var data = new FormData() data.append('file', file.attachments[0]) fetch('/uploads', { method: 'POST', headers: { 'Accept': 'application/json' }, body: data }).then(response => { // Make sure the response was valid if (response.status >= 200 && response.status < 300) { return response } else { // Custom Logic on messaging (eg. toast) done({progress: 100}) } }).then(response => { return response.json() }).then(data => { // Pass the URL back to Unlayer to mark this upload as completed done({ progress: 100, url: data.filelink }) }) })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The current sample for custom file storage results in an Unhandled Runtime Error.
https://docs.unlayer.com/docs/custom-file-storage
Ideally I would like to be able to do something like:
The text was updated successfully, but these errors were encountered: