lib/google/cloud/storage/bucket.rb in google-cloud-storage-1.27.0 vs lib/google/cloud/storage/bucket.rb in google-cloud-storage-1.28.0
- old
+ new
@@ -1126,10 +1126,15 @@
# [Content-Language](http://tools.ietf.org/html/bcp47) response
# header to be returned when the file is downloaded.
# @param [String] content_type The
# [Content-Type](https://tools.ietf.org/html/rfc2616#section-14.17)
# response header to be returned when the file is downloaded.
+ # @param [DateTime] custom_time A custom time specified by the user for
+ # the file. Once set, custom_time can't be unset, and it can only be
+ # changed to a time in the future. If custom_time must be unset, you
+ # must either perform a rewrite operation, or upload the data again
+ # and create a new file.
# @param [String] crc32c The CRC32c checksum of the file data, as
# described in [RFC 4960, Appendix
# B](http://tools.ietf.org/html/rfc4960#appendix-B).
# If provided, Cloud Storage will only create the file if the value
# matches the value calculated by the service. See
@@ -1247,11 +1252,11 @@
# file.download "path/to/downloaded/gzipped.txt",
# skip_decompress: true
#
def create_file file, path = nil, acl: nil, cache_control: nil,
content_disposition: nil, content_encoding: nil,
- content_language: nil, content_type: nil,
+ content_language: nil, content_type: nil, custom_time: nil,
crc32c: nil, md5: nil, metadata: nil,
storage_class: nil, encryption_key: nil, kms_key: nil,
temporary_hold: nil, event_based_hold: nil
ensure_service!
ensure_io_or_file_exists! file
@@ -1262,9 +1267,10 @@
gapi = service.insert_file name, file, path, acl: File::Acl.predefined_rule_for(acl),
md5: md5,
cache_control: cache_control,
content_type: content_type,
+ custom_time: custom_time,
content_disposition: content_disposition,
crc32c: crc32c,
content_encoding: content_encoding,
metadata: metadata,
content_language: content_language,