Skip to content

Commit 03d95e7

Browse files
committed
ORCH-1073 [UDX-37] Casper Support large file handling
Added an availability to specify source path to the file. File content will be split and uploaded by parts.
1 parent 97069a7 commit 03d95e7

File tree

8 files changed

+934
-32
lines changed

8 files changed

+934
-32
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project are documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/).
55

6+
## 2.2.1 - 2018-08-23
7+
8+
### Added
9+
- Support for efficient large file upload using the `source` path to the file
10+
611
## 2.2.1 - 2018-08-16
712

813
### Added

docs/examples/object_storage/object.tf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,27 @@ resource "oci_objectstorage_object" "object1" {
1313
content = "${file("index.html")}"
1414
}
1515

16+
resource "oci_objectstorage_object" "source-object" {
17+
namespace = "${data.oci_objectstorage_namespace.ns.namespace}"
18+
bucket = "${oci_objectstorage_bucket.bucket1.name}"
19+
object = "same_index.html"
20+
content_language = "en-US"
21+
content_type = "text/html"
22+
source = "index.html"
23+
}
24+
1625
data "oci_objectstorage_object_head" "object-head1" {
1726
namespace = "${data.oci_objectstorage_namespace.ns.namespace}"
1827
bucket = "${oci_objectstorage_bucket.bucket1.name}"
1928
object = "${oci_objectstorage_object.object1.object}"
2029
}
2130

31+
data "oci_objectstorage_object_head" "source-object-head" {
32+
namespace = "${data.oci_objectstorage_namespace.ns.namespace}"
33+
bucket = "${oci_objectstorage_bucket.bucket1.name}"
34+
object = "${oci_objectstorage_object.source-object.object}"
35+
}
36+
2237
data "oci_objectstorage_objects" "objects1" {
2338
namespace = "${data.oci_objectstorage_namespace.ns.namespace}"
2439
bucket = "${oci_objectstorage_bucket.bucket1.name}"
@@ -33,6 +48,15 @@ output object-head-data {
3348
EOF
3449
}
3550

51+
output object-source-head-data {
52+
value = <<EOF
53+
54+
object = ${data.oci_objectstorage_object_head.source-object-head.object}
55+
content-length = ${data.oci_objectstorage_object_head.source-object-head.content-length}
56+
content-type = ${data.oci_objectstorage_object_head.source-object-head.content-type}
57+
EOF
58+
}
59+
3660
output objects {
3761
value = "${data.oci_objectstorage_objects.objects1.objects}"
3862
}

docs/object_storage/objects.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The following attributes are exported:
1717
Note: Metadata keys are case-insensitive and all returned keys will be lower case.
1818
* `namespace` - The top-level namespace used for the request.
1919
* `object` - The name of the object. Avoid entering confidential information. Example: `test/object1.log`
20+
* `source` - An absolute path to a file on the local system to upload to the object store.
2021

2122

2223

@@ -27,14 +28,15 @@ Creates a new object or overwrites an existing one.
2728
The following arguments are supported:
2829

2930
* `bucket` - (Required) The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1`
30-
* `content` - (Optional) The object to upload to the object store.
31+
* `content` - (Optional) The object to upload to the object store. Cannot be defined if `source` is defined.
3132
* `content_encoding` - (Optional) The content encoding of the object.
3233
* `content_language` - (Optional) The content language of the object.
3334
* `content_type` - (Optional) The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call.
3435
* `metadata` - (Optional) Optional user-defined metadata key and value.
3536
Note: All specified keys must be in lower case.
3637
* `namespace` - (Required) The top-level namespace used for the request.
3738
* `object` - (Required) The name of the object. Avoid entering confidential information. Example: `test/object1.log`
39+
* `source` - (Optional) An absolute path to a file on the local system. Cannot be defined if `content` is defined.
3840

3941

4042
### Update Operation

0 commit comments

Comments
 (0)