files.com 1.0.221 → 1.0.222

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35d424ac4aab256474b32522ecef3af8e8b2cea8142f390e643a7fa2862db9a8
4
- data.tar.gz: b5b3cfd4ccbff04fdf849802d99195c3395def5caa8ccabd317b8bc93951e452
3
+ metadata.gz: a4740d16a35756c850793e85565092bc484aa782b57f1327f2b49879bb9c51e9
4
+ data.tar.gz: 4356ee405876e0efe117bd4f51cf9929691f03a4124b5c710cd54e033e4980e8
5
5
  SHA512:
6
- metadata.gz: 1fefd2ed6233e8d67b708dc73e0140b0c0686a21a936c80382fa7372b1a4549cbc0f94a25206a0c89d0ebe52da81920d7b00b1c0c26718d7af0a4cbbf213e33a
7
- data.tar.gz: e7de32d1d2326236aaaed051727e4429f92d33892f3e5e4fd9f8876f336cd62078096426d923e16a8f830bfdf836c670eb6eb16b31161b6d6d750163892ecfd5
6
+ metadata.gz: d3148181f696f031dde933cc4ee7d485ada9859fb2e16e1c881ebfe1f5ff1facda6bb6f84dc6feee7924cbb3eee3ff6f2e6475efd6c8d43c1bcada374f299659
7
+ data.tar.gz: 4490d4d8fd11640db9836b23b06a68e7207868dc5ff4279dc67a78f7a035d1ca28369aa169679190a062b6690136268111c195d76446436c5c0daab85a666360
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.221
1
+ 1.0.222
data/docs/file.md CHANGED
@@ -213,6 +213,7 @@ Files::File.begin_upload(path,
213
213
  parts: 1,
214
214
  ref: "upload-1",
215
215
  restart: 1,
216
+ size: 1,
216
217
  with_rename: true
217
218
  )
218
219
  ```
@@ -225,6 +226,7 @@ Files::File.begin_upload(path,
225
226
  * `parts` (int64): How many parts to fetch?
226
227
  * `ref` (string):
227
228
  * `restart` (int64): File byte offset to restart from.
229
+ * `size` (int64): Total bytes of file being uploaded (include bytes being retained if appending/restarting).
228
230
  * `with_rename` (boolean): Allow file rename instead of overwrite?
229
231
 
230
232
 
@@ -339,6 +341,7 @@ file.begin_upload(
339
341
  parts: 1,
340
342
  ref: "upload-1",
341
343
  restart: 1,
344
+ size: 1,
342
345
  with_rename: true
343
346
  )
344
347
  ```
@@ -351,4 +354,5 @@ file.begin_upload(
351
354
  * `parts` (int64): How many parts to fetch?
352
355
  * `ref` (string):
353
356
  * `restart` (int64): File byte offset to restart from.
357
+ * `size` (int64): Total bytes of file being uploaded (include bytes being retained if appending/restarting).
354
358
  * `with_rename` (boolean): Allow file rename instead of overwrite?
@@ -908,6 +908,7 @@ module Files
908
908
  # parts - int64 - How many parts to fetch?
909
909
  # ref - string -
910
910
  # restart - int64 - File byte offset to restart from.
911
+ # size - int64 - Total bytes of file being uploaded (include bytes being retained if appending/restarting).
911
912
  # with_rename - boolean - Allow file rename instead of overwrite?
912
913
  def begin_upload(params = {})
913
914
  params ||= {}
@@ -918,6 +919,7 @@ module Files
918
919
  raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
919
920
  raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
920
921
  raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
922
+ raise InvalidParameterError.new("Bad parameter: size must be an Integer") if params.dig(:size) and !params.dig(:size).is_a?(Integer)
921
923
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
922
924
 
923
925
  Api.send_request("/file_actions/begin_upload/#{@attributes[:path]}", :post, params, @options)
@@ -1073,6 +1075,7 @@ module Files
1073
1075
  # parts - int64 - How many parts to fetch?
1074
1076
  # ref - string -
1075
1077
  # restart - int64 - File byte offset to restart from.
1078
+ # size - int64 - Total bytes of file being uploaded (include bytes being retained if appending/restarting).
1076
1079
  # with_rename - boolean - Allow file rename instead of overwrite?
1077
1080
  def self.begin_upload(path, params = {}, options = {})
1078
1081
  params ||= {}
@@ -1082,6 +1085,7 @@ module Files
1082
1085
  raise InvalidParameterError.new("Bad parameter: parts must be an Integer") if params.dig(:parts) and !params.dig(:parts).is_a?(Integer)
1083
1086
  raise InvalidParameterError.new("Bad parameter: ref must be an String") if params.dig(:ref) and !params.dig(:ref).is_a?(String)
1084
1087
  raise InvalidParameterError.new("Bad parameter: restart must be an Integer") if params.dig(:restart) and !params.dig(:restart).is_a?(Integer)
1088
+ raise InvalidParameterError.new("Bad parameter: size must be an Integer") if params.dig(:size) and !params.dig(:size).is_a?(Integer)
1085
1089
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
1086
1090
 
1087
1091
  response, options = Api.send_request("/file_actions/begin_upload/#{params[:path]}", :post, params, options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.221
4
+ version: 1.0.222
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com