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

图片上传失败,编辑器依旧插入blob图片 #15

Open
kenjiding opened this issue Jun 5, 2020 · 9 comments
Open

图片上传失败,编辑器依旧插入blob图片 #15

kenjiding opened this issue Jun 5, 2020 · 9 comments

Comments

@kenjiding
Copy link

image

images_upload_handler的代码如下:
image

请问你,如何做到上传图片成功才插入图片,失败不插入任何东西

@cleveng
Copy link

cleveng commented Sep 9, 2020

我也想知道。
以及 images_dataimg_filter 这个配置 在 vue-tinymce 组件 setting 中是否生效。

@pitilesszgw
Copy link

请问你们解决了么

@cleveng
Copy link

cleveng commented Jan 21, 2022 via email

@pitilesszgw
Copy link

@svcg 怎么解决的呀,失败不插入图片

@pitilesszgw
Copy link

601642748505_ pic

失败后地址也被改变了

@cleveng
Copy link

cleveng commented Jan 21, 2022 via email

@pitilesszgw
Copy link

我晚上回复你吧。现在手上没有那个项目。 在 2022年1月21日 下午3:02:36 上,pitilesszgw @.> 写道:

[image: 601642748505_ pic] https://user-images.githubusercontent.com/30107688/150481551-9dceb48b-77a6-41ac-a753-8acc1968c655.jpg 失败后地址也被改变了 — Reply to this email directly, view it on GitHub <#15 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYQ3QYYDOXXCSLQGKFS43TUXEAIZANCNFSM4NTK6BRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.
>

好的 谢谢

@cleveng
Copy link

cleveng commented Jan 22, 2022 via email

@pitilesszgw
Copy link

需要重写 images_upload_handler
images_upload_handler(blob, success, failure) { let form = new FormData() const ext = blob.blob().type.split('/')[1]; form.append('file', blob.blob(), new Date().getTime() + '.' + ext) this.asyncUploadFile(form).then(res => { const {file_path} = res.data; this.$Message.info("附件上传成功..") success(file_path); }) 在 2022年1月21日 下午3:08:10 上,pitilesszgw @.> 写道:

我晚上回复你吧。现在手上没有那个项目。 在 2022年1月21日 下午3:02:36 上,pitilesszgw @. > 写道: … <#> [image: 601642748505_ pic] https://user-images.githubusercontent.com/30107688/150481551-9dceb48b-77a6-41ac-a753-8acc1968c655.jpg https://user-images.githubusercontent.com/30107688/150481551-9dceb48b-77a6-41ac-a753-8acc1968c655.jpg 失败后地址也被改变了 — Reply to this email directly, view it on GitHub <#15 (comment) <#15 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYQ3QYYDOXXCSLQGKFS43TUXEAIZANCNFSM4NTK6BRQ https://github.com/notifications/unsubscribe-auth/AHYQ3QYYDOXXCSLQGKFS43TUXEAIZANCNFSM4NTK6BRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.> 好的 谢谢 — Reply to this email directly, view it on GitHub <#15 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYQ3Q2KSCCUPCBBSBXO7YTUXEA5VANCNFSM4NTK6BRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.
>

非常感谢🙏

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

No branches or pull requests

3 participants