fixed DocumentsStorageActions::AddDocument to work correctly with codecs