For the complete documentation index, see llms.txt. This page is also available as Markdown.

put

Upload a local file as an object

Usage

ionosctl object-storage object put [flags]

Aliases

For object-storage command:

[os]

For object command:

[obj]

For put command:

[p]

Description

Upload a local file into a bucket, stored under the key you choose with --key.

The key is the object's full name in the bucket, including any "/" separators you want to appear as a pseudo-folder path (e.g. photos/2025/image.jpg). The key does NOT have to match the source filename. If the key already exists it is overwritten; on a versioning-enabled bucket the overwrite creates a new version rather than destroying the old bytes.

--content-type sets the object's MIME type, which the service stores and returns as the Content-Type header on later downloads (it drives how browsers and clients interpret the bytes). If omitted, it is auto-detected from the source file extension, falling back to application/octet-stream when the extension is unknown.

The whole file is read from --source and uploaded as the object body.

Options

Examples

Last updated