Blueimp文件上传:从URL添加图像 [英] Blueimp File Upload: add image from URL

查看:218
本文介绍了Blueimp文件上传:从URL添加图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jQuery File Upload插件( http://blueimp.github.io/jQuery -File-Upload / )为我的网站上传图片。



我想从URL添加图片,当用户添加到文本框中时。

解决方案 b
检查了这一点: https://developer.mozilla.org/zh-CN/docs/Web/API/Blob/Blob
并且这个 http://qnimate.com/ javascript-create-file-object-from-url /

如果你设法实现它,请在这里发表。


I am using jQuery File Upload plugin (http://blueimp.github.io/jQuery-File-Upload/) for image upload for my website.

I want to add image from URL, when user add in textbox.

解决方案

You have to find a way to download the image from the URL, convert the img into any Type supported by the blob constructor, build a blob file, and call the jQuery File Upload add method like $('#fileupload').fileupload('add', {files: blob})', all grammatically with javascript.

Check this out: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob and this http://qnimate.com/javascript-create-file-object-from-url/

If you manage to implement it, please post here.

这篇关于Blueimp文件上传:从URL添加图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆