files.com 1.0.221 → 1.0.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/file.md +4 -0
- data/lib/files.com/models/file.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4740d16a35756c850793e85565092bc484aa782b57f1327f2b49879bb9c51e9
|
4
|
+
data.tar.gz: 4356ee405876e0efe117bd4f51cf9929691f03a4124b5c710cd54e033e4980e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3148181f696f031dde933cc4ee7d485ada9859fb2e16e1c881ebfe1f5ff1facda6bb6f84dc6feee7924cbb3eee3ff6f2e6475efd6c8d43c1bcada374f299659
|
7
|
+
data.tar.gz: 4490d4d8fd11640db9836b23b06a68e7207868dc5ff4279dc67a78f7a035d1ca28369aa169679190a062b6690136268111c195d76446436c5c0daab85a666360
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
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)
|