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
I've added support to the viewer component. Here's example usage:
function updateThumbnail() { let dataURL = viewer.captureThumbnail(512, 384); let imageBlob = viewer.dataURLtoBlob(dataURL); let img = document.getElementsByClassName('img-preview')[0]; img.src = dataURL; let formData = new FormData(); formData.append('file', imageBlob, 'thumbnail.png'); fetch(window.location + '/updateThumbnail', { method: 'POST', body: formData }) .then(response => response.json()) .then(data => { console.log('Upload successful:', data); }) .catch((error) => { console.error('Error uploading image:', error); }); }
This code should update the thumbnail preview on the page and also POST a blob to a (non-existent) endpoint.
The text was updated successfully, but these errors were encountered:
Admins also need a way to do this for assets they don't own. Maybe the "edit" page can accept a superuser override?
Sorry, something went wrong.
jamesrampton
No branches or pull requests
I've added support to the viewer component. Here's example usage:
This code should update the thumbnail preview on the page and also POST a blob to a (non-existent) endpoint.
The text was updated successfully, but these errors were encountered: