The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Rocket.Chat/packages/rocketchat-file-upload/lib/FileUploadBase.js

40 lines
719 B

9 years ago
/* globals FileUploadBase:true, UploadFS */
10 years ago
/* exported FileUploadBase */
10 years ago
9 years ago
UploadFS.config.defaultStorePermissions = new UploadFS.StorePermissions({
insert: function(userId/*, doc*/) {
return userId;
},
update: function(userId, doc) {
return userId === doc.userId;
},
remove: function(userId, doc) {
return RocketChat.authz.hasPermission(Meteor.userId(), 'delete-message', doc.rid) || (RocketChat.settings.get('Message_AllowDeleting') && userId === doc.userId);
9 years ago
}
});
FileUploadBase = class FileUploadBase {
constructor(meta, file) {
this.id = Random.id();
this.meta = meta;
this.file = file;
}
getProgress() {
}
getFileName() {
return this.meta.name;
}
start() {
}
stop() {
}
10 years ago
};