weixin_39948277
weixin_39948277
2020-12-02 19:17

toDataURL returning nothing

It was working before, including the examples made and I: - https://codesandbox.io/s/vue-avanced-cropper-basic-f711u - https://codesandbox.io/s/gallery-crop-rnk26

You select the image, crop but the images are not being loaded as the base64 representation of the crop is not being return by toDataURL

该提问来源于开源项目:Norserium/vue-advanced-cropper

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

17条回答

  • weixin_39948277 weixin_39948277 5月前

    image

    It does work on Firefox

    点赞 评论 复制链接分享
  • weixin_39778815 weixin_39778815 5月前

    It looks like the problem of Brave browser. I will try to install it and test it on my virtual machine later.

    点赞 评论 复制链接分享
  • weixin_39948277 weixin_39948277 5月前

    It might be, the weird part is that it's chromium but still they might have changed something. It was working before and not it's not.

    点赞 评论 复制链接分享
  • weixin_39778815 weixin_39778815 5月前

    I'm sure this problem is specific to conflict of Brave Shield and Codesandbox. The examples at the demo site works well even when that shield is enabled.

    点赞 评论 复制链接分享
  • weixin_39778815 weixin_39778815 5月前

    do you encounter this problem at your site?

    点赞 评论 复制链接分享
  • weixin_39948277 weixin_39948277 5月前

    Nop, it's working locally, sometimes it doesn't, it's weird, might be a bug somehow on Brave but it's all good. Sorry the delay to answer.

    点赞 评论 复制链接分享
  • weixin_39738755 weixin_39738755 5月前

    We have a similar problem with Brave mobile on our website. I reported that some time ago but I think it got lost lost there. The issue is related to the HTMLCanvasElement.toDataURL() function. Might be the problem in this case too :)

    https://community.brave.com/t/htmlcanvaselement-todataurl-htmlcanvaselement-toblob-do-not-work-on-brave-mobile-with-fingerprint-protection/67774

    点赞 评论 复制链接分享
  • weixin_39948277 weixin_39948277 5月前

    Yes, I thought it was something related to the component but it's the browser. https://github.com/brave/brave-browser/issues/6081

    点赞 评论 复制链接分享
  • weixin_39948277 weixin_39948277 5月前

    That is the image: https://unsplash.com/photos/K4mSJ7kc0As In the console there's two errors but I don't know if it's related: image

    点赞 评论 复制链接分享
  • weixin_39778815 weixin_39778815 5月前

    This image was just uploaded by me. I don't see any problems.

    Do you save the image and then upload to the sandbox? Does this error occur when you upload image in the private mode?

    点赞 评论 复制链接分享
  • weixin_39948277 weixin_39948277 5月前

    I just download the image and upload, nothing else. Even on private doesn't work.

    点赞 评论 复制链接分享
  • weixin_39778815 weixin_39778815 5月前

    Could you try to upload image at any other browser / device?

    点赞 评论 复制链接分享
  • weixin_39948277 weixin_39948277 5月前

    image

    For me it's not, any image I select is like this. The toDataURL is returning empty for some reason.

    点赞 评论 复制链接分享
  • weixin_39778815 weixin_39778815 5月前

    It's interesting. What's the browser do you use? What are the images do you upload? Does it work with previous versions of this library?

    点赞 评论 复制链接分享
  • weixin_39948277 weixin_39948277 5月前

    For some reason it works sometimes and other times it doesn't. I'm using Brave that is actually chromium. The images are regular images from unsplash.

    点赞 评论 复制链接分享
  • weixin_39778815 weixin_39778815 5月前

    Please send me links at the images, that have problems with uploading. Does the console contain any errors or warnings?

    点赞 评论 复制链接分享
  • weixin_39778815 weixin_39778815 5月前

    Hello, ! Both examples works. Could you provide some details? Maybe this problem occurs when you upload the specific image.

    点赞 评论 复制链接分享

相关推荐