Skip to content
Console

S3 API compatibility

Bitiful S4 is compatible with the S3 protocol, so mainstream SDKs and tools work after you change the endpoint. This page lists the actual support status of each API operation and where S4 differs from standard S3.

Connection details

ItemValue
Endpointhttps://s3.bitiful.net
Regioncn-east-1
Virtual-hosted-style addresshttps://<bucket-name>.s3.bitiful.net/<object-key> (recommended)
Path-style addresshttps://s3.bitiful.net/<bucket-name>/<object-key>
CredentialsSub-user AccessKey

Both address styles work. Use the SDK's default virtual-hosted style; you do not need to force path style.

Support status

LabelMeaning
SupportedBehaves like S3; differences are noted in the notes
Partially supportedWorks, but with clear limitations
No effectThe request succeeds but does nothing. Do not rely on it
Not supportedReturns an error, or is not implemented

Operations marked "No effect" are kept so client tools do not report errors, for example object lock. A successful call does not mean your data is protected.

Object operations

OperationStatusNotes
GetObjectSupportedSupports Range, conditional reads, and response-* override parameters. Ignores versionId and partNumber
HeadObjectSupportedSame as above
PutObjectSupportedSupports conditional writes, user metadata, tags, and Content-MD5
DeleteObjectSupportedReturns 204 even if the object does not exist; returns 500 if the deletion fails on the server, and you can retry. Supports conditional deletion with If-Match. Ignores versionId
DeleteObjectsSupportedUp to 1000 keys at a time. If you lack write permission on any one key, the whole batch returns 403
CopyObjectSupportedSupports REPLACE for metadata and tags, and source and destination conditions. Self-copy differs; see below. The source must be a file object
Move / renameSupported (extension)Append ?move=true to the value of x-amz-copy-source. See Move and rename objects
PostObject (form upload)SupportedSupports policy, success_action_status, success_action_redirect, and content-length-range. Conditional writes are not supported
GetObjectTagging / PutObjectTagging / DeleteObjectTaggingSupportedUp to 10 tags; keys up to 128 bytes, values up to 256 bytes
SelectObjectContentSupported
GetObjectAcl / PutObjectAclNo effectReturns 204. Set permissions in the console using sub-users or public read
PutObjectRetention / PutObjectLegalHoldNo effectReturns 204; the object is not locked
GetObjectRetention / GetObjectLegalHoldNot supported
GetObjectAttributesNot supportedUse HeadObject
RestoreObject, GetObjectTorrentNot supported
RenameObjectNot supportedUse the move extension

The x-amz-acl, x-amz-server-side-encryption*, and x-amz-object-lock-* headers are accepted but have no effect. x-amz-storage-class is saved and returned in listings, but it does not affect how data is stored or priced.

Multipart uploads

OperationStatusNotes
CreateMultipartUploadSupportedCan carry conditional headers; the conditions are kept and evaluated at Complete
UploadPartSupportedIgnores conditional headers
UploadPartCopySupportedSupports x-amz-copy-source-range and source conditions
CompleteMultipartUploadSupportedSupports conditional writes. You can submit only some of the parts; parts you do not list are discarded
AbortMultipartUploadSupportedDoes not affect an existing object with the same name
ListPartsSupportedPaginates with max-parts and part-number-marker
ListMultipartUploadsPartially supportedSupports prefix, max-uploads, and upload-id-marker. delimiter grouping is not supported
  • Part numbers range from 1 to 10000. Every part except the last must be at least 5 MiB, or the request returns EntityTooSmall.
  • At Complete, each part must carry the ETag returned by UploadPart; a mismatch returns InvalidPart.
  • If all parts are 0 bytes, the request returns InvalidPart. Use PutObject directly for empty files.
  • A failed Complete does not delete the uploaded parts; you can fix the request and retry.
  • Incomplete parts are retained indefinitely. Call AbortMultipartUpload when you no longer need them.
  • The ETag of a multipart upload looks like <md5>-<part-count> and does not equal the file's MD5.

Bucket operations

OperationStatusNotes
ListBucketsSupportedReturns only the buckets the current sub-user has been granted access to
HeadBucket, GetBucketLocationSupportedLocation is always cn-east-1
ListObjectsV2SupportedSee List objects
ListObjects (V1)SupportedV2 is recommended
CreateBucketPartially supportedSub-users cannot create buckets; create them in the console. If the bucket already exists and belongs to you, it returns 409 BucketAlreadyOwnedByYou, which keeps tools that create buckets automatically working
DeleteBucketPartially supportedSub-users cannot delete buckets; delete them in the console
GetBucketCors / PutBucketCors / DeleteBucketCorsSupportedRequires write permission on the bucket; up to 10 rules. With no rules, Get returns an empty configuration instead of 404. You can also configure this in the console
GetBucketAclPartially supportedThe response does not reflect sub-user grants; do not use it to determine permissions
PutBucketAclNot supported501 NotImplemented
GetBucketPolicyPartially supportedAlways returns 404 NoSuchBucketPolicy
PutBucketPolicy, DeleteBucketPolicyNot supportedPut returns 501
GetBucketVersioningPartially supportedAlways returns not enabled
PutBucketVersioningNot supported501
ListObjectVersionsNot supported
GetBucketLifecycleConfigurationPartially supportedWith no rules, returns 404 NoSuchLifecycleConfiguration
PutBucketLifecycleConfigurationNot supported501
DeleteBucketLifecycleNo effectReturns 204
GetObjectLockConfigurationPartially supportedAlways returns not enabled
PutObjectLockConfigurationNot supported501
GetBucketRequestPaymentPartially supportedAlways returns BucketOwner

None of the following bucket-level features are implemented: encryption, tagging, logging, static website, event notifications, replication, Block Public Access (PublicAccessBlock), ownership controls, transfer acceleration, inventory, analytics, metrics, and intelligent tiering.

Do not send requests for subresources that are not listed (for example ?encryption, ?tagging, or ?website). S4 ignores query parameters it does not recognize and handles the request as an ordinary listing, bucket creation, or bucket deletion request, so a successful response does not mean the configuration exists.

Static websites, mirror back-to-origin, hotlink protection, and similar features are configured in the console. See Static websites and domains, Mirror back-to-origin, and Access control.

List objects

ParameterNotes
max-keysDefaults to 100 (standard S3 defaults to 1000); the maximum is 1000, and larger values are treated as 1000
prefixSupported
delimiterOnly / is supported; other values return 501 NotImplemented
continuation-tokenUse the NextContinuationToken returned by the previous page
start-afterSupported
encoding-typeSupports url
fetch-ownerIgnored; Owner is always returned
  • Paginate based on IsTruncated and NextContinuationToken; do not assume each page has 1000 entries.
  • Do not rely on strict lexicographic order. Listing proceeds by directory level, so the order with and without a delimiter can differ.
  • If a sub-user has only directory-level listing permission, the results are narrowed automatically to the authorized directories.
  • Returned entries include the extra Mime and Metadata fields compared with standard S3; SDKs ignore them.

Signatures

MethodStatus
Signature V4 (Authorization header)Supported, recommended
Signature V4 presigned URLSupported, up to 7 days. See Presigned URLs
Signature V4 POST policySupported
Signature V2 (header and presigned)Supported; recommended only for legacy clients
STS temporary credentialsNot supported

Requests whose time differs from the server time by more than 15 minutes are rejected.

All x-amz-* headers in a request must be signed, or the request returns 403 AccessDenied with the message There were headers present in the request which were not signed. The exceptions are x-amz-content-sha256 and x-amz-date, and headers whose value is identical to a query parameter of the same name in the URL. SDKs handle this automatically; watch for it when you sign requests by hand or create presigned uploads.

Payload signing forms

x-amz-content-sha256 accepts the following values:

ValueNotes
SHA-256 of the contentRegular signing. S4 verifies the actual content; a mismatch returns 400 XAmzContentSHA256Mismatch and the existing object is unaffected
UNSIGNED-PAYLOADThe content is not signed
STREAMING-AWS4-HMAC-SHA256-PAYLOADChunked signing
STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILERChunked signing with a checksum trailer
STREAMING-UNSIGNED-PAYLOAD-TRAILERUnsigned content with a checksum trailer. The default for recent SDKs over HTTPS

Chunked forms are used only for PutObject and UploadPart, and cannot be combined with presigned URLs. Recent SDKs do not require you to disable Payload Signing or default checksums.

Integrity checks

MethodNotes
Content-MD5Verified before writing; a mismatch returns 400 BadDigest and the existing object is unaffected
Trailer checksumSupports CRC32, CRC32C, CRC64NVME, SHA1, and SHA256; a mismatch returns BadDigest
x-amz-content-sha256When the value is a content digest, it is verified before writing; a mismatch returns 400 XAmzContentSHA256Mismatch
x-amz-checksum-* in request headersAccepted but not verified
Checksums returned by GetObject / HeadObjectNot supported; x-amz-checksum-mode is ignored

For end-to-end verification, use regular signing (content SHA-256), Content-MD5, or a trailer checksum. The ETag of a regular PutObject is the MD5 of the content, so you can use it to cross-check as well.

Sizes and counts

ItemLimit
Single PutObject20 GiB
Single part5 MiB to 20 GiB; the last part can be smaller
Number of parts10000
Batch delete1000 per request
Listing1000 per page

For limits on QPS, bandwidth, number of buckets, and so on, see Limits.

Object key rules

For naming conventions, see Key terms and concepts. The following points are easy to get wrong: A key can be at most 1024 bytes after UTF-8 encoding; longer keys return 400 KeyTooLongError.

CaseHow S4 handles it
Non-printable charactersRejected with 400. Besides control characters, the full-width space (U+3000) and zero-width characters count as non-printable, and some combined emoji are also rejected because they contain a zero-width joiner
Regular spacesSupported
A whole segment that is . or .., for example a/../bRejected. Names such as a..b are not affected
Consecutive slashes, for example a//bMerged into one; equivalent to a/b
Leading slashRemoved; /a is equivalent to a
% in a keyDecoded only once. Writing %2520 in the URL means %20 in the key
CaseSensitive

Differences between directory buckets and standard S3

All S4 buckets are directory buckets, and paths are organized as real directories. Compared with the flat structure of standard S3, the differences are as follows.

A file and a directory cannot share a name

OperationResult
a/b.txt exists, then you write a file a409 ExistingObjectIsDirectory. The same applies to PutObject, CopyObject, and completing a multipart upload
File a exists, then you write a/b.txt409 ExistingObjectIsFile
File a exists, then you create directory a/ or a/b/409 ExistingObjectIsFile

A rejected write does not change existing content. After all objects under a directory are deleted (and no directory object was created), you can write a file with the same name. When the condition of a conditional request does not hold, 412 is returned first. Type conflicts in a move return 400. See Move objects.

Directory objects

  • A key ending in / is a directory object, for example photos/. PutObject creates the directory and ignores the request body.
  • GET photos/ returns 200 with empty content. GET photos (without the slash) returns 404.
  • Writing photos/a.jpg creates the parent directories automatically. Automatically created directories are not objects and do not appear in listings without a delimiter.
  • Deleting a non-empty directory object returns success, but the files inside are not affected. To delete an entire directory, do it in the console. See Manage files.

Change metadata with self-copy

Copying an object onto itself with x-amz-metadata-directive: REPLACE changes its metadata without re-uploading:

  • x-amz-meta-*, Cache-Control, Content-Disposition, and Expires follow the request, and anything you don't send is cleared.
  • Content-Type follows the request. If you don't send it, the original value is kept (standard S3 changes it to binary/octet-stream).

Content-Disposition on download

When you download directly through *.s3.bitiful.net, the response Content-Disposition is always attachment, so the browser downloads the file instead of previewing it. Setting it to inline is changed to attachment, and the file name is kept. To open files directly in the browser, use a CDN domain.

.apk and .ipa files cannot be downloaded directly through S4; the request returns 403 FileTypeForbidden, so use the CDN. Uploads and HEAD are not affected.