use*_*555 3 amazon-s3 meteor meteor-slingshot
是否有任何最佳方法来调整大小并将文件保存到流星中的s3。
我虽然打算使用cfs软件包,但是它们给服务器带来了太多的负担。
要将图像直接上传到我正在使用的s3 slingshot,这很好。
但弹弓仅将文件对象作为输入,而无需流来存储文件。
是否有任何选项可以在客户端调整图像大小并将其传递给slingshot程序包
包:https : //github.com/CulturalMe/meteor-slingshot 问题:https : //github.com/CulturalMe/meteor-slingshot/issues/36
是的,有可能使用clientside-image-manipulation,这是我未经测试的文档解释:
Template.upload.events({
'change #image-upload': function(event, target) {
var uploader = new Slingshot.Upload("myFileUploads");
var file = event.target.files[0];
var img = null;
processImage(file, 300, 300, function(data){
uploader.send(data, function (error, downloadUrl) {
if(error)
throw new Meteor.Error('upload', error);
Meteor.users.update(Meteor.userId(), {$push: {"profile.files": downloadUrl}});
});
});
}
});
Run Code Online (Sandbox Code Playgroud)
还有其他与图像相关的插件值得研究atmosphere.js
| 归档时间: |
|
| 查看次数: |
1616 次 |
| 最近记录: |