webDav usage problem

Description

I use WebDAV for “File Upload”. It is uploaded to WebDAV successfully (the file is present on WebDav), but in the chat it gives the error “Error: Request failed with status code 404 [ufs: cannot upload file]”

Server Setup Information

  • Version of Rocket.Chat Server: 4.6.2
  • Operating System: Linux
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 14.18.3
  • MongoDB Version: 4.2.17
  • Proxy: caddy
  • Firewalls involved: No

Any additional Information

{“level”:35,“time”:“2022-05-17T09:30:35.706Z”,“pid”:1286,“hostname”:“rocket”,“name”:“API”,“method”:“POST”,“url”:"/api/v1/rooms.upload/A6YDKoDPmRM8BMHPm",“userId”:“y5njfC462J4N7ooun”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36”,“length”:“137243”,“host”:“127.0.0.1:3000”,“referer”:“https://rocket.XXXXXX.pro/direct/A6YDKoDPmRM8BMHPm",“remoteIP”:“172.16.254.113”,“err”:{“type”:“errorClass”,“message”:"Error: Request failed with status code 404 [ufs: cannot upload file]”,“stack”:“Error: Error: Request failed with status code 404 [ufs: cannot upload file]
at MethodInvocation.ufsComplete (packages/jalik:ufs/ufs-methods.js:122:11)
at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1885:12)
at packages/ddp-server/livedata_server.js:1803:15
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)
at packages/ddp-server/livedata_server.js:1801:36
at new Promise ()
at Server.applyAsync (packages/ddp-server/livedata_server.js:1800:12)
at Server.apply (packages/ddp-server/livedata_server.js:1739:26)
at Server.call (packages/ddp-server/livedata_server.js:1721:17)
at FileUploadClass._doInsert (app/file-upload/server/lib/FileUpload.js:683:24)
at FileUploadClass.insert (app/file-upload/server/lib/FileUpload.js:710:15)
at FileUploadClass.insertSync (packages/meteor.js:311:21)
at Object.post (app/api/server/v1/rooms.js:112:35)
at app/api/server/api.js:425:96
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)
at Object._internalRouteActionHandler [as action] (app/api/server/api.js:425:39)
at Route._callEndpoint (packages/rocketchat_restivus/lib/route.coffee:150:32)
at packages/rocketchat_restivus/lib/route.coffee:59:33
at packages/simple_json-routes.js:100:9
=> awaited here:
at Promise.await (/snap/rocketchat-server/1515/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)
at Server.apply (packages/ddp-server/livedata_server.js:1752:22)
at Server.call (packages/ddp-server/livedata_server.js:1721:17)
at FileUploadClass._doInsert (app/file-upload/server/lib/FileUpload.js:683:24)
at FileUploadClass.insert (app/file-upload/server/lib/FileUpload.js:710:15)
at FileUploadClass.insertSync (packages/meteor.js:311:21)
at Object.post (app/api/server/v1/rooms.js:112:35)
at app/api/server/api.js:425:96
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)
at Object._internalRouteActionHandler [as action] (app/api/server/api.js:425:39)
at Route._callEndpoint (packages/rocketchat_restivus/lib/route.coffee:150:32)
at packages/rocketchat_restivus/lib/route.coffee:59:33
at packages/simple_json-routes.js:100:9”,“isClientSafe”:true,“error”:“ufs: cannot upload file”,“reason”:{“message”:“Request failed with status code 404”,“stack”:“Error: Request failed with status code 404
at createError (/snap/rocketchat-server/1515/programs/server/npm/node_modules/webdav/node_modules/axios/lib/core/createError.js:16:15)
at settle (/snap/rocketchat-server/1515/programs/server/npm/node_modules/webdav/node_modules/axios/lib/core/settle.js:17:12)
at RedirectableRequest.handleResponse (/snap/rocketchat-server/1515/programs/server/npm/node_modules/webdav/node_modules/axios/lib/adapters/http.js:210:9)
at RedirectableRequest.emit (events.js:400:28)
at RedirectableRequest.emit (domain.js:475:12)
at RedirectableRequest._processResponse (/snap/rocketchat-server/1515/programs/server/npm/node_modules/follow-redirects/index.js:269:10)
at ClientRequest.RedirectableRequest._onNativeResponse (/snap/rocketchat-server/1515/programs/server/npm/node_modules/follow-redirects/index.js:50:10)
at Object.onceWrapper (events.js:520:26)
at ClientRequest.emit (events.js:400:28)
at ClientRequest.emit (domain.js:475:12)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
at TLSSocket.socketOnData (_http_client.js:515:22)
at TLSSocket.emit (events.js:400:28)
at TLSSocket.emit (domain.js:475:12)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)
at TLSSocket.Readable.push (internal/streams/readable.js:206:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
at TLSWrap.callbackTrampoline (internal/async_hooks.js:130:17)”,“config”:{“url”:“https://webdav.XXXXX.com/rocket/opukqSo64YTGJjkoH",“method”:“get”,“headers”:{“Accept”:"application/json, text/plain, /”,“Authorization”:“Basic aWQta3IwMHRAeWFuZGV4LnJ1OnRma3ZldXB6c2l1YWZ4aGM=”,“User-Agent”:“axios/0.19.2”},“transformRequest”:[null],“transformResponse”:[null],“timeout”:0,“responseType”:“stream”,“xsrfCookieName”:“XSRF-TOKEN”,“xsrfHeaderName”:“X-XSRF-TOKEN”,“maxContentLength”:-1}},“errorType”:“Meteor.Error”},“status”:400,“responseTime”:629,“msg”:“Error: Request failed with status code 404 [ufs: cannot upload file]”}