bulk-upload
***********


Description
===========

Uploads all files in a given directory and all subdirectories.


Usage
=====

   oci os object bulk-upload [OPTIONS]


Options
=======


-ns, --namespace [text]
-----------------------

Object Storage namespace. If not provided, this parameter will be
obtained internally using a call to 'oci os ns get'


-bn, --bucket-name [text]
-------------------------

The name of the bucket. [required]


--src-dir [text]
----------------

The directory which contains files to upload. Files in the directory
and all subdirectories will be uploaded. [required]


--object-prefix [text]
----------------------

A prefix to apply to the names of all files being uploaded


--metadata [text]
-----------------

Arbitrary string keys and values for user-defined metadata. This will
be applied to all files being uploaded. Must be in JSON format.
Example: '{"key1":"value1","key2":"value2"}'


--content-type [text]
---------------------

The content type to apply to all files being uploaded.


--content-language [text]
-------------------------

The content language to apply to all files being uploaded.


--content-encoding [text]
-------------------------

The content encoding to apply to all files being uploaded.


--overwrite
-----------

If a file being uploaded already exists in Object Storage, overwrite
the existing object in Object Storage without a confirmation prompt.
If neither this flag nor --no-overwrite is specified, you will be
prompted each time an object would be overwritten.

Specifying this flag will also allow for faster uploads as the CLI
will not initially check whether or not the files already exist in
Object Storage.


--no-overwrite
--------------

If a file being uploaded already exists in Object Storage, do not
overwite it. If neither this flag nor --overwrite is specified, you
will be prompted each time an object would be overwritten


--no-multipart
--------------

Do not use multipart uploads to upload the file in parts. By default
files above 128 MiB will be uploaded in multiple parts, then combined
server-side. This applies to all files being uploaded


--part-size [integer]
---------------------

Part size (in MiB) to use if uploading via multipart upload
operations. This applies to all files which will be uploaded in
multiple parts. Part size must be greater than 10 MiB


--disable-parallel-uploads
--------------------------

[DEPRECATED] This option is no longer used. If a file in the directory
will be uploaded in multiple parts, this option disables those parts
from being uploaded in parallel. This applies to all files being
uploaded in multiple parts


--parallel-upload-count [integer]
---------------------------------

The number of parallel operations to perform. Decreasing this value
will make bulk uploads less resource intensive but they may take
longer. Increasing this value may improve bulk upload times, but the
upload process will consume more system resources and network
bandwidth. [default: 10]


--include [text]
----------------

Only upload files which match the provided pattern. Patterns are taken
relative to the CURRENT directory. This option can be provided
mulitple times to match on mulitple patterns. Supported pattern
symbols are:

*: Matches everything

?: Matches any single character

[sequence]: Matches any character in sequence

[!sequence]: Matches any character not in sequence


--exclude [text]
----------------

Only upload files which do not match the provided pattern. Patterns
are taken relative to the CURRENT directory. This option can be
provided mulitple times to match on mulitple patterns. Supported
pattern symbols are:

*: Matches everything

?: Matches any single character

[sequence]: Matches any character in sequence

[!sequence]: Matches any character not in sequence


--from-json [text]
------------------

Provide input to this command as a JSON document from a file.

Options can still be provided on the command line. If an option exists
in both the JSON document and the command line then the command line
specified value will be used


-?, -h, --help
--------------

Show this message and exit.


Examples
========


Upload all files from a given directory
----------------------------------------

   oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory


Forcing object overwrite to resolve object name collision
---------------------------------------------------------

If a file being uploaded already exists in Object Storage, it can be
overwritten without a prompt by using the "--overwrite" flag.

   oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory --overwrite


Prevent object overwrite to resolve object name collision
---------------------------------------------------------

If a file being uploaded already exists in Object Storage, it can be
preserved (not overwritten) without a prompt by using the "--no-
overwrite" flag.

   oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory --no-overwrite


Applying metadata
-----------------

Metadata can be applied when the files are put into Object Storage by
specifying the "--metadata" flag and passing metadata either via a
file or as a string on the command line.

Note: The same metadata will be applied to **all** uploaded files.

   oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory --metadata '{"key1":"value1","key2":"value2"}'
   oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory --metadata file://path/to/my/metadata.json
