Trying to upload files to a Raw repository in Nexus using the REST API.
Taken from the Maven Examples, but changed to use Raw fields.
curl -v -u 'deployment:password' -X POST -F 'raw.directory=/config/test' -F 'raw.asset1=fileArchive.tar.gz' -F 'raw.asset1.filename=fileArchive.tar.gz' 'https://nexus.company.com:8443/service/rest/v1/components?repository=reponame'
Not sure what is wrong. The files are uploaded, but they are empty in Nexus.
Running Nexus OSS 3.21.1
While writing this I took a look at suggested existing topics.
There I found another way to upload to RAW.
curl -v -u 'deployment:password' --upload-file fileArchive.tar.gz 'https://nexus.company.com:8443/repository/reponame/config/test/fileArchive.tar.gz'
Perhaps this could have been told in the documentation for the REST API, with RAW Examples.