The @cap-js/attachments package is a CDS plugin that provides out-of-the box asset storage and handling by using an aspect Attachments. It also provides a CAP-level, easy to use integration of the SAP Object Store.
[odata] - PUT /unintegratedrequest-cockpit/UnintegratedDataRequests_attachments(up__ID=913b389d-77d4-4973-9c86-9ab108f6e3d4,ID=eed0a156-f3a8-4fe8-b2bd-da13f23e7aca,IsActiveEntity=false)/content
[cds] - DeserializationError: Invalid value "undefined" in content-type header
at RequestContentNegotiator.negotiate (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/format/RequestContentNegotiator.js:36:15)
at DeserializingCommand.execute (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/DeserializingCommand.js:43:39)
at CommandExecutor._execute (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/CommandExecutor.js:71:17)
at /Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/CommandExecutor.js:81:18
at PresetResponseHeadersCommand.execute (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/PresetResponseHeadersCommand.js:43:5)
at CommandExecutor._execute (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/CommandExecutor.js:71:17)
at /Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/CommandExecutor.js:81:18
at LocaleNegotiatorCommand.execute (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/LocaleNegotiatorCommand.js:51:7)
at CommandExecutor._execute (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/CommandExecutor.js:71:17)
at /Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/CommandExecutor.js:81:18 {
_rootCause: TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at new NodeError (node:internal/errors:399:5)
at Function.from (node:buffer:339:9)
at Function.parseContentTypeHeader (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-commons/http/HttpHeader.js:14:59)
at RequestContentNegotiator.negotiate (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/format/RequestContentNegotiator.js:33:22)
at DeserializingCommand.execute (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/DeserializingCommand.js:43:39)
at CommandExecutor._execute (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/CommandExecutor.js:71:17)
at /Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/CommandExecutor.js:81:18
at PresetResponseHeadersCommand.execute (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/PresetResponseHeadersCommand.js:43:5)
at CommandExecutor._execute (/Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/CommandExecutor.js:71:17)
at /Users/***/PycharmProjects/cockpit/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/CommandExecutor.js:81:18 {
code: 'ERR_INVALID_ARG_TYPE'
},
id: '1955289',
level: 'WARNING',
timestamp: 1718184177894
}
With his request being send: