This repository was archived by the owner on Mar 14, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 236
This repository was archived by the owner on Mar 14, 2019. It is now read-only.
Not Ok for storage #356
Copy link
Copy link
Closed
Description
I saw that @BraveKenny was successful in getting images stored and retrieved in "Best/Correct way to store images in public dirrectory and get their url in the callback?"
That's awesome!
Unfortunately, when I attempt to add the to the user's profile.profileImage I get
"Meteor.makeErrorType.errorClass {error: 409, reason: "MongoError: not okForStorage", details: undefined, message: "MongoError: not okForStorage [409]", errorType: "Meteor.Error"…}details: undefinederror: 409errorType: "Meteor.Error"message: "MongoError: not okForStorage [409]"
My fileObj look like the following. It has references to dataman and such in there. A bit more complex then I expected. I did make sure to add cfs-ejson-file
I made sure the user has a profile and profile.profileImage property.
'change .fileUploader': function(event, template) {
FS.Utility.eachFile(event, function(file) {
var uId = Meteor.userId();
if (uId) {
var fileObj = Images.insert(file);
Meteor.users.update({
_id: uId
}, {
$set: {
'profile.profileImage': fileObj
}
}, function(err, result) {
if (err) {
console.log("Error updating user. " + err.detail);
} else {
console.log('set profileImage');
}
});
}
});
}
I'm I missing something here?
Thanks
Marc
Metadata
Metadata
Assignees
Labels
No labels