uppy icon indicating copy to clipboard operation
uppy copied to clipboard

Broken preview shown after cropping

Open leenasn opened this issue 2 years ago • 2 comments

Initial checklist

  • [X] I understand this is a bug report and questions should be posted in the Community Forum
  • [X] I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

I am not sure what am doing wrong. The preview is broken after I crop the image.

But when I upload, the file gets uploaded correctly. Can you help me fix the problem?

Here is the video explaining the issue:

https://www.loom.com/share/297ab381940542c4856e7af1d0d11f88

This is code I've:

uppy = new Uppy.Uppy({
  restrictions: {
    maxNumberOfFiles: 1,
    allowedFileTypes: ['image/*'],
    maxFileSize: 1000000,
    minFileSize: 1000,      }
})
.use(Uppy.ThumbnailGenerator, {
  thumbnailType: 'image/png',
  waitForThumbnailsBeforeUpload: true,
})
.use(Uppy.Dashboard, {
  inline: true,
  target: '#drag-drop-area',
  height: 350,
  proudlyDisplayPoweredByUppy: false,
  waitForThumbnailsBeforeUpload: true,
  thumbnailType: 'image/png',
  thumbnailWidth: 200
})
.use(Uppy.Webcam, {
  target: Uppy.Dashboard,
  showVideoSourceDropdown: true,
})
.use(Uppy.XHRUpload, { endpoint: url })
.use(Uppy.Form, {
  target: ".form",
  getMetaFromForm: false,
  addResultToForm: false,
  submitOnSuccess: true,
  triggerUploadOnSubmit: false,
})
uppy.use(Uppy.ImageEditor, {
  target: Uppy.Dashboard,

})

Expected behavior

Showing the cropped image preview after the crop window is closed

Actual behavior

The preview is broken

leenasn avatar Oct 21 '22 17:10 leenasn

Can reproduce this, this happens because of the .use(Dashboard, { waitForThumbnailsBeforeUpload: true }) option.

lakesare avatar Sep 13 '23 09:09 lakesare

Can reproduce it too

korsar4eg avatar Feb 17 '24 13:02 korsar4eg