Open sahanDissanayake opened 8 years ago
Interesting observation
I insert the files from the console for testing as follows
var newFile = new FS.File();
newFile.attachData('https://crossorigin.me/http://www.wallpaperup.com/uploads/wallpapers/2014/01/25/237083/47b7ca5bd727bcda5c2dff4086f1a6d0.jpg', function (error) {
if (error) throw error;
newFile.name("newOne.png");newFile.metadata = {foo: "bar"};
Images.insert(newFile, function (error, fileObj) {
//If !error, we have inserted new doc with ID fileObj._id, and
//remote URL data will be downloaded and stored on the server. The
//URL must support a HEAD request since we do one to get the
//content type, size, etc. for filtering inserts.
});
});
Observation is, When I run this code multiple times, One image is created each time [ 2 should have been created ] but the image size toggles between the big and small everytime.. dont know exactly whats going on in here
EDIT: Seems like only the small [ 20x20 ] image gets saved in the bucket, not the larger images
Ok seems like the issue I had was I was using the same bucket, When you use different buckets, its all good.. Any thoughts how to fix this ?
I want to use one bucket and different folders
One other fix I'm running with right now
beforeWrite: function(fileObj) {
return {
name: 'different_name_1 '
}
},
For each instance I give a different name so then there are two file with different names
Hi, I tried the example code here https://github.com/CollectionFS/Meteor-CollectionFS/tree/devel/packages/s3#client-server-and-s3-credentials
250 px width image copy gets saved, but not both
Any thoughts ?