You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If following code is used to create GridFile resulting file will be invalid.
var file = new GridFile()
{
Content = content,
Id = Norm.ObjectId.NewObjectId(),
UploadDate = DateTime.Now,
FileName = filename,
ContentType = contentType
};
mongoDb.Files().Save(file);
Reason is that when Content is set autogenerated Id is used. Then Id is changed which result that file and chunks are not related anymore.... Id change should be forbidden after content is set, or all chunks should be updated to use new Id.
It's not a big issue, but it took me a few hours and forced me to debug norm code :)
BTW, great lib ...
The text was updated successfully, but these errors were encountered:
If following code is used to create GridFile resulting file will be invalid.
var file = new GridFile()
{
Content = content,
Id = Norm.ObjectId.NewObjectId(),
UploadDate = DateTime.Now,
FileName = filename,
ContentType = contentType
};
mongoDb.Files().Save(file);
Reason is that when Content is set autogenerated Id is used. Then Id is changed which result that file and chunks are not related anymore.... Id change should be forbidden after content is set, or all chunks should be updated to use new Id.
It's not a big issue, but it took me a few hours and forced me to debug norm code :)
BTW, great lib ...
The text was updated successfully, but these errors were encountered: