Upload an object
You can upload objects into a bucket in two ways:
- simple upload is available via the control panel, API, and S3 tools. We do not recommend using it to upload objects larger than 1 GB;
- segmented upload is possible via the Swift API, S3 API, and some S3 tools. It is recommended for files larger than 1 GB.
You can upload any number of objects to a bucket unless bucket limits are set.
When uploading objects via the S3 API, you can use conditional requests.
If the bucket uses Object Lock and default object lock is enabled, temporary lock will be applied to uploaded objects.
Simple upload
We do not recommend using Cyrillic characters in object names.
- In the control panel, in the top menu, click Products and select S3.
- Go to Buckets.
- Open the bucket page → Objects tab.
- Click Upload files
- Select the objects to upload.
Segmented upload
Segmented upload is the uploading of objects in parts (segments), which is recommended for files larger than 1 GB.
Segmented upload is possible via the Swift API (SLO/DLO technology), S3 API (Multipart Upload technology), and some S3 tools. The segmented upload process depends on the API and tool used. Some tools (Rclone, Cyberduck) support segmented uploads and automatically enable it for objects larger than a certain size. In other cases, it must be initialized manually.
With segmented upload, you can:
- upload large objects in smaller segments;
- increase upload speed using parallel requests;
- in case of connection failures, do not reload the object, but repeat uploading only the necessary segments.
If a segmented upload completes abnormally, segments that have been uploaded (incomplete multipart uploads) will be queued for deletion after six months. Due to the specifics of deleting segmented objects, such segments might not be deleted. Selectel does not guarantee the deletion completion time or that segments of incomplete segmented uploads will definitely be deleted. Monitoring and deleting segments is the responsibility of Selectel customers.
How it works
During a segmented upload of an object to the main bucket (<bucket_name>), a service bucket is created where object segments will be placed:
- when uploading objects via the S3 API, the bucket is created automatically and named
<bucket_name>_s3multipartuploads; - when uploading objects via the Swift API, the bucket is created using the API utility or SDK and named
<bucket_name>_segmentsor<bucket_name>.file-segments.
Instead of the object, a manifest is uploaded to the main bucket (<bucket_name>) — a file describing the segments and the paths to them. When downloading the manifest file, the segments are automatically assembled into the object.
By default, service buckets are not displayed in the control panel in the S3 bucket list — you can enable the display of service buckets in the settings.
Features
When uploading objects via API, take into account:
- S3 limits;
- specifics of deleting segmented objects;
- recommendations not to use Cyrillic characters in object names.
If you use Object Lock and enable, modify, or remove an object lock or default temporary lock in a bucket, all segments of the object inherit the object lock settings. If an object is locked, its segments cannot be deleted while the lock is active. However, lock information will not be displayed for the object segments — you can check for locks only on the object itself.
Re-uploading an object
If the name of the object being uploaded matches the name of an object in the bucket, the behavior depends on whether versioning is enabled in the bucket:
-
if versioning is enabled:
- the new object will become the current version of the object and will be assigned a version ID;
- the previous version of the object will not be overwritten by the new one, but will be moved to the object version list with the same name;
-
if versioning is suspended or disabled, the new object will overwrite the previous one.
Upload speed
Upload speed for objects to buckets is affected by:
- channel bandwidth;
- connection mode;
- upload manager software used;
- distance between the storage servers and you;
- host load.
Billing
With any upload method, charges apply to storage usage, number of API requests, and outbound traffic.
- with simple upload, the storage volume of the entire object is billed;
- with segmented upload, the object is stored in segments, so in fact only segments are billed. The manifest file takes up minimal space (a few KB), so the cost of storing an object with segments is almost the same as storing an entire object.