Use the oci os object bulk-upload command and required parameters to upload a group of files in a directory and its sub-directories to a bucket:
Command
CopyTry It
oci os object bulk-upload --bucket-name bucket_name --src-dir source_directory_location [OPTIONS]
where source_directory_location is the upload file system directory path, such as C:\workspace\Upload\ or /home/user/Documents/Upload.
If your source directory has subdirectories, the subdirectory names are prepended to the names of the files stored in those subdirectories, delimited with a forward slash (/) character. For example, if a file named maple.jpg is stored in the subdirectory trees, when the file is uploaded, Object Storage assigns the name trees/maple.jpg to the resulting object.
By default, all objects in the bucket are uploaded. Use the Optional Parameters listed in the oci os object bulk-upload page to specify what files in bulk to upload.
Specifying the Storage Tier of the Uploaded Bulk Objects 🔗
Include the storage-tier parameter to assign a storage tier to the objects you're uploading in bulk.
For example, if you're uploading to a Standard tier-configured bucket and you wan to upload objects to the Infrequent Access storage tier, include --storage-tier InfrequentAccess in the command:
If you don't specify --storage-tier, the object is automatically assigned and uploaded to the default storage tier of the bucket (Standard or Archive).
Appending a Prefix String to the Uploaded Bulk Objects 🔗
To append a prefix string to the object names created by your bulk upload, include the object-prefix parameter. For example: