Skip to content
New issue

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

Broken preview shown after cropping #4163

Closed
2 tasks done
leenasn opened this issue Oct 21, 2022 · 2 comments · Fixed by #4926
Closed
2 tasks done

Broken preview shown after cropping #4163

leenasn opened this issue Oct 21, 2022 · 2 comments · Fixed by #4926
Assignees
Labels

Comments

@leenasn
Copy link

leenasn commented Oct 21, 2022

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • 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

@lakesare
Copy link
Collaborator

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

@korsar4eg
Copy link

Can reproduce it too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants