I’m using the Soto library to do a multipart upload to Spaces. I seem to get “501 Not Implemented” responses when trying to make a simple ListMultipartUploads
request
At least, I think that’s what’s going on. The Soto library hides a lot of the complexity, and relies on Swift NIO, which is designed for extreme performance, and is thus very async and very hard to debug. The request has this content (forgive the excessive formatting):
p preparedRequest.url
(Foundation.URL) "https://<redacted>.sfo2.digitaloceanspaces.com/?uploads="
p preparedRequest.head
(NIOHTTP1.HTTPRequestHead) {
_storage = 0x0000600002102fc0 {
method = GET
uri = "/?uploads="
version = (_minor = 1, _major = 1)
}
headers = {
headers = 5 values {
[0] = (0 = "user-agent", 1 = "Soto/6.0")
[1] = (0 = "host", 1 = "<redacted>.sfo2.digitaloceanspaces.com")
[2] = (0 = "x-amz-date", 1 = "20240731T062806Z")
[3] = (0 = "x-amz-content-sha256", 1 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")
[4] = (0 = "authorization", 1 = "AWS4-HMAC-SHA256 Credential=<redacted>/20240731//s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=<redacted>")
}
keepAliveState = unknown
}
}
Body:
<?xml version="1.0" encoding="UTF-8"?><Error><Code>NotImplemented</Code><Message></Message><RequestId>tx000002f996400c083ddc3-0066a9e215-b9ef07e-sfo2b</RequestId><HostId>b9ef07e-sfo2b-sfo2-zg02</HostId></Error>
I am not including x-amz-expected-bucket-owner
in the request, I’m not sure what to put there, or why it’s even needed, since I have credentials for the bucket.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya,
The “501 Not Implemented” error you’re encountering while trying to use the Soto library for multipart uploads to Spaces typically indicates that the operation or feature you’re trying to use is not supported by the implementation of the S3 API.
You can check for a mistake in the URL or HTTP headers can cause the request to fail.
You can also check the following docs to understand which are the set limits:
https://docs.digitalocean.com/products/spaces/details/limits/
Each part of a multi-part upload can be at most 5 GB.
Each part of a multi-part upload must be at least 5 MiB, except for the final part.
Multi-part uploads can have at most 10,000 parts.
The maximum supported total size of a multi-part upload is 5 TB.
PUT
requests and individual parts of multi-part uploads sent to the Spaces CDN using pre-signed URLs have a maximum payload of 8,100 KiB, or 7.91 MiB.If you have a large number of objects or multi-part uploads, you may not be able to view all your objects in the control panel. You can still view all the objects using the Spaces API and s3-compatible tools such as s3cmd or AWS S3.
Regards
This seems to be an issue when making requests via HTTP/2. Making them via HTTP/1.1, things work as expected.
Can you verify whether or not DOSpaces support HTTP/2 requests?