{"record":{"id":"cb1e5b82d9b7000d","repo":"RocketChat/Rocket.Chat","slug":"error-file-upload-disabled","errorCode":"error-file-upload-disabled","errorMessage":"File uploads are disabled.","messagePattern":"File uploads are disabled\\.","errorType":"error_code","errorClass":"Meteor.Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/lib/media/file-upload/lib/FileUpload.ts","lineNumber":168,"sourceCode":"\t\t\treturn false;\n\t\t}\n\n\t\t// livechat users can upload files but they don't have an userId\n\t\tconst user = (file.userId && (await Users.findOne(file.userId))) || undefined;\n\n\t\tconst room = file.rid ? await Rooms.findOneById(file.rid) : undefined;\n\t\tif (!isFederationUpload && !room) {\n\t\t\treturn false;\n\t\t}\n\t\tconst directMessageAllowed = settings.get('FileUpload_Enabled_Direct');\n\t\tconst fileUploadAllowed = settings.get('FileUpload_Enabled');\n\t\tif (!isFederationUpload && room && user?.type !== 'app' && (await canAccessRoomAsync(room, user, file)) !== true) {\n\t\t\treturn false;\n\t\t}\n\t\tconst language = user?.language || 'en';\n\t\tif (!fileUploadAllowed) {\n\t\t\tconst reason = i18n.t('FileUpload_Disabled', { lng: language });\n\t\t\tthrow new Meteor.Error('error-file-upload-disabled', reason);\n\t\t}\n\n\t\tif (room && !directMessageAllowed && room.t === 'd') {\n\t\t\tconst reason = i18n.t('File_not_allowed_direct_messages', { lng: language });\n\t\t\tthrow new Meteor.Error('error-direct-message-file-upload-not-allowed', reason);\n\t\t}\n\n\t\t// -1 maxFileSize means there is no limit\n\t\tif (maxFileSize > -1 && (file.size || 0) > maxFileSize) {\n\t\t\tconst reason = i18n.t('File_exceeds_allowed_size_of_bytes', {\n\t\t\t\tsize: filesize(maxFileSize),\n\t\t\t\tlng: language,\n\t\t\t});\n\t\t\tthrow new Meteor.Error('error-file-too-large', reason);\n\t\t}\n\n\t\tif (!settings.get('E2E_Enable_Encrypt_Files') && isE2EEUpload(file)) {\n\t\t\tconst reason = i18n.t('Encrypted_file_not_allowed', { lng: language });","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/media/file-upload/lib/FileUpload.ts#L150-L186","documentation":"Error \"File uploads are disabled.\" thrown in RocketChat/Rocket.Chat.","triggerScenarios":"Thrown at apps/meteor/server/lib/media/file-upload/lib/FileUpload.ts:168 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable file uploads by setting FileUpload_Enabled to true in Administration > File Upload."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}