diff --git a/app/webdav/server/methods/uploadFileToWebdav.js b/app/webdav/server/methods/uploadFileToWebdav.js index aff6f7f7b636..d21f5c4a8642 100644 --- a/app/webdav/server/methods/uploadFileToWebdav.js +++ b/app/webdav/server/methods/uploadFileToWebdav.js @@ -1,10 +1,13 @@ import { Meteor } from 'meteor/meteor'; import { settings } from '../../../settings'; +import { Logger } from '../../../logger'; import { getWebdavCredentials } from './getWebdavCredentials'; import { WebdavAccounts } from '../../../models'; import { WebdavClientAdapter } from '../lib/webdavClientAdapter'; +const logger = new Logger('WebDAV_Upload', {}); + Meteor.methods({ async uploadFileToWebdav(accountId, fileData, name) { if (!Meteor.userId()) { @@ -30,6 +33,7 @@ Meteor.methods({ await client.putFileContents(`${ uploadFolder }/${ name }`, buffer, { overwrite: false }); return { success: true }; } catch (error) { + logger.error(error); if (error.response) { const { status } = error.response; if (status === 404) {