files.com 1.1.659 → 1.1.661
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/bundle.md +8 -0
- data/docs/file.md +54 -0
- data/lib/files.com/models/bundle.rb +15 -0
- data/lib/files.com/models/file.rb +54 -0
- data/lib/files.com/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f5d1657cd2960ca08a61d277113bab0c606889dbcd13de1a0f0101f60bce5cf5
|
|
4
|
+
data.tar.gz: 454cec2c47344387c5ecf6bcb290ec2e23563f4213d98a27143619e0ed5de982
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb6e585c04932db0c0d34aceef06ad83f1f4ef7cd97adf00255e0ff26a9720098ef64b0903d35e9c963f21348bd926eae24f457b86d678b6469894cae21bc94f
|
|
7
|
+
data.tar.gz: 85eb230534050c522e8f42b21bffa8e505edc489b1a12e4ea6f2f7fdc40c5451371275085c0494b7e23489ac8f2b8da5c145c640f2632b12b1e648c7cc440e5f
|
data/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.661
|
data/docs/bundle.md
CHANGED
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"deleted_at": "2000-01-01T01:00:00Z",
|
|
62
62
|
"dont_separate_submissions_by_folder": true,
|
|
63
63
|
"max_uses": 1,
|
|
64
|
+
"internal_name": "Quarterly reports",
|
|
64
65
|
"note": "The internal note on the bundle.",
|
|
65
66
|
"path_template": "{{name}}_{{ip}}",
|
|
66
67
|
"path_template_time_zone": "Eastern Time (US & Canada)",
|
|
@@ -122,6 +123,7 @@
|
|
|
122
123
|
* `deleted_at` (date-time): Bundle deleted at date/time
|
|
123
124
|
* `dont_separate_submissions_by_folder` (boolean): Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
|
|
124
125
|
* `max_uses` (int64): Maximum number of times bundle can be accessed
|
|
126
|
+
* `internal_name` (string): Internal name for identifying this Share Link.
|
|
125
127
|
* `note` (string): Bundle internal note
|
|
126
128
|
* `path_template` (string): Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, `strftime` directives, and any custom form data.
|
|
127
129
|
* `path_template_time_zone` (string): Timezone to use when rendering timestamps in path templates.
|
|
@@ -207,6 +209,7 @@ Files::Bundle.create(
|
|
|
207
209
|
finalize_snapshot: false,
|
|
208
210
|
max_uses: 1,
|
|
209
211
|
group_id: 1,
|
|
212
|
+
internal_name: "Quarterly reports",
|
|
210
213
|
description: "The public description of the bundle.",
|
|
211
214
|
note: "The internal note on the bundle.",
|
|
212
215
|
code: "abc123",
|
|
@@ -241,6 +244,7 @@ Files::Bundle.create(
|
|
|
241
244
|
* `finalize_snapshot` (boolean): If true, finalize the snapshot of this bundle's contents. Note that `create_snapshot` must also be true.
|
|
242
245
|
* `max_uses` (int64): Maximum number of times bundle can be accessed
|
|
243
246
|
* `group_id` (int64): Owning group ID. If set, members of this group can view, edit, and share this Share Link.
|
|
247
|
+
* `internal_name` (string): Internal name for identifying this Share Link.
|
|
244
248
|
* `description` (string): Public description
|
|
245
249
|
* `note` (string): Bundle internal note
|
|
246
250
|
* `code` (string): Bundle code. This code forms the end part of the Public URL.
|
|
@@ -302,6 +306,7 @@ Files::Bundle.update(id,
|
|
|
302
306
|
inbox_id: 1,
|
|
303
307
|
max_uses: 1,
|
|
304
308
|
group_id: 1,
|
|
309
|
+
internal_name: "Quarterly reports",
|
|
305
310
|
note: "The internal note on the bundle.",
|
|
306
311
|
path_template: "{{name}}_{{ip}}",
|
|
307
312
|
path_template_time_zone: "Eastern Time (US & Canada)",
|
|
@@ -337,6 +342,7 @@ Files::Bundle.update(id,
|
|
|
337
342
|
* `inbox_id` (int64): ID of the associated inbox, if available.
|
|
338
343
|
* `max_uses` (int64): Maximum number of times bundle can be accessed
|
|
339
344
|
* `group_id` (int64): Owning group ID. If set, members of this group can view, edit, and share this Share Link.
|
|
345
|
+
* `internal_name` (string): Internal name for identifying this Share Link.
|
|
340
346
|
* `note` (string): Bundle internal note
|
|
341
347
|
* `path_template` (string): Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, `strftime` directives, and any custom form data.
|
|
342
348
|
* `path_template_time_zone` (string): Timezone to use when rendering timestamps in path templates.
|
|
@@ -412,6 +418,7 @@ bundle.update(
|
|
|
412
418
|
inbox_id: 1,
|
|
413
419
|
max_uses: 1,
|
|
414
420
|
group_id: 1,
|
|
421
|
+
internal_name: "Quarterly reports",
|
|
415
422
|
note: "The internal note on the bundle.",
|
|
416
423
|
path_template: "{{name}}_{{ip}}",
|
|
417
424
|
path_template_time_zone: "Eastern Time (US & Canada)",
|
|
@@ -447,6 +454,7 @@ bundle.update(
|
|
|
447
454
|
* `inbox_id` (int64): ID of the associated inbox, if available.
|
|
448
455
|
* `max_uses` (int64): Maximum number of times bundle can be accessed
|
|
449
456
|
* `group_id` (int64): Owning group ID. If set, members of this group can view, edit, and share this Share Link.
|
|
457
|
+
* `internal_name` (string): Internal name for identifying this Share Link.
|
|
450
458
|
* `note` (string): Bundle internal note
|
|
451
459
|
* `path_template` (string): Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, `strftime` directives, and any custom form data.
|
|
452
460
|
* `path_template_time_zone` (string): Timezone to use when rendering timestamps in path templates.
|
data/docs/file.md
CHANGED
|
@@ -268,6 +268,32 @@ Files::File.move(path,
|
|
|
268
268
|
* `overwrite` (boolean): Overwrite existing file(s) in the destination?
|
|
269
269
|
|
|
270
270
|
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Transform a file and save the output to a destination path
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
Files::File.transform(path,
|
|
277
|
+
destination: "destination",
|
|
278
|
+
transform_type: "transform_type",
|
|
279
|
+
target_format: "target_format",
|
|
280
|
+
width: 1,
|
|
281
|
+
height: 1,
|
|
282
|
+
overwrite: false
|
|
283
|
+
)
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Parameters
|
|
287
|
+
|
|
288
|
+
* `path` (string): Required - Path to operate on.
|
|
289
|
+
* `destination` (string): Required - Destination file path for the transformed output.
|
|
290
|
+
* `transform_type` (string): Required - Transform type. Supported values are `image_convert` and `document_convert`.
|
|
291
|
+
* `target_format` (string): Required - Destination format to create.
|
|
292
|
+
* `width` (int64): Maximum output width for image_convert.
|
|
293
|
+
* `height` (int64): Maximum output height for image_convert.
|
|
294
|
+
* `overwrite` (boolean): Overwrite existing file in the destination?
|
|
295
|
+
|
|
296
|
+
|
|
271
297
|
---
|
|
272
298
|
|
|
273
299
|
## Decrypt a GPG-encrypted file and save it to a destination path
|
|
@@ -507,6 +533,34 @@ file.move(
|
|
|
507
533
|
* `overwrite` (boolean): Overwrite existing file(s) in the destination?
|
|
508
534
|
|
|
509
535
|
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
## Transform a file and save the output to a destination path
|
|
539
|
+
|
|
540
|
+
```
|
|
541
|
+
file = Files::File.find(path)
|
|
542
|
+
|
|
543
|
+
file.transform(
|
|
544
|
+
destination: "destination",
|
|
545
|
+
transform_type: "transform_type",
|
|
546
|
+
target_format: "target_format",
|
|
547
|
+
width: 1,
|
|
548
|
+
height: 1,
|
|
549
|
+
overwrite: false
|
|
550
|
+
)
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
### Parameters
|
|
554
|
+
|
|
555
|
+
* `path` (string): Required - Path to operate on.
|
|
556
|
+
* `destination` (string): Required - Destination file path for the transformed output.
|
|
557
|
+
* `transform_type` (string): Required - Transform type. Supported values are `image_convert` and `document_convert`.
|
|
558
|
+
* `target_format` (string): Required - Destination format to create.
|
|
559
|
+
* `width` (int64): Maximum output width for image_convert.
|
|
560
|
+
* `height` (int64): Maximum output height for image_convert.
|
|
561
|
+
* `overwrite` (boolean): Overwrite existing file in the destination?
|
|
562
|
+
|
|
563
|
+
|
|
510
564
|
---
|
|
511
565
|
|
|
512
566
|
## Decrypt a GPG-encrypted file and save it to a destination path
|
|
@@ -257,6 +257,15 @@ module Files
|
|
|
257
257
|
@attributes[:max_uses] = value
|
|
258
258
|
end
|
|
259
259
|
|
|
260
|
+
# string - Internal name for identifying this Share Link.
|
|
261
|
+
def internal_name
|
|
262
|
+
@attributes[:internal_name]
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
def internal_name=(value)
|
|
266
|
+
@attributes[:internal_name] = value
|
|
267
|
+
end
|
|
268
|
+
|
|
260
269
|
# string - Bundle internal note
|
|
261
270
|
def note
|
|
262
271
|
@attributes[:note]
|
|
@@ -507,6 +516,7 @@ module Files
|
|
|
507
516
|
# inbox_id - int64 - ID of the associated inbox, if available.
|
|
508
517
|
# max_uses - int64 - Maximum number of times bundle can be accessed
|
|
509
518
|
# group_id - int64 - Owning group ID. If set, members of this group can view, edit, and share this Share Link.
|
|
519
|
+
# internal_name - string - Internal name for identifying this Share Link.
|
|
510
520
|
# note - string - Bundle internal note
|
|
511
521
|
# path_template - string - Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, `strftime` directives, and any custom form data.
|
|
512
522
|
# path_template_time_zone - string - Timezone to use when rendering timestamps in path templates.
|
|
@@ -538,6 +548,7 @@ module Files
|
|
|
538
548
|
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if params[:inbox_id] and !params[:inbox_id].is_a?(Integer)
|
|
539
549
|
raise InvalidParameterError.new("Bad parameter: max_uses must be an Integer") if params[:max_uses] and !params[:max_uses].is_a?(Integer)
|
|
540
550
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params[:group_id] and !params[:group_id].is_a?(Integer)
|
|
551
|
+
raise InvalidParameterError.new("Bad parameter: internal_name must be an String") if params[:internal_name] and !params[:internal_name].is_a?(String)
|
|
541
552
|
raise InvalidParameterError.new("Bad parameter: note must be an String") if params[:note] and !params[:note].is_a?(String)
|
|
542
553
|
raise InvalidParameterError.new("Bad parameter: path_template must be an String") if params[:path_template] and !params[:path_template].is_a?(String)
|
|
543
554
|
raise InvalidParameterError.new("Bad parameter: path_template_time_zone must be an String") if params[:path_template_time_zone] and !params[:path_template_time_zone].is_a?(String)
|
|
@@ -638,6 +649,7 @@ module Files
|
|
|
638
649
|
# finalize_snapshot - boolean - If true, finalize the snapshot of this bundle's contents. Note that `create_snapshot` must also be true.
|
|
639
650
|
# max_uses - int64 - Maximum number of times bundle can be accessed
|
|
640
651
|
# group_id - int64 - Owning group ID. If set, members of this group can view, edit, and share this Share Link.
|
|
652
|
+
# internal_name - string - Internal name for identifying this Share Link.
|
|
641
653
|
# description - string - Public description
|
|
642
654
|
# note - string - Bundle internal note
|
|
643
655
|
# code - string - Bundle code. This code forms the end part of the Public URL.
|
|
@@ -665,6 +677,7 @@ module Files
|
|
|
665
677
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
|
|
666
678
|
raise InvalidParameterError.new("Bad parameter: max_uses must be an Integer") if params[:max_uses] and !params[:max_uses].is_a?(Integer)
|
|
667
679
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params[:group_id] and !params[:group_id].is_a?(Integer)
|
|
680
|
+
raise InvalidParameterError.new("Bad parameter: internal_name must be an String") if params[:internal_name] and !params[:internal_name].is_a?(String)
|
|
668
681
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
|
669
682
|
raise InvalidParameterError.new("Bad parameter: note must be an String") if params[:note] and !params[:note].is_a?(String)
|
|
670
683
|
raise InvalidParameterError.new("Bad parameter: code must be an String") if params[:code] and !params[:code].is_a?(String)
|
|
@@ -716,6 +729,7 @@ module Files
|
|
|
716
729
|
# inbox_id - int64 - ID of the associated inbox, if available.
|
|
717
730
|
# max_uses - int64 - Maximum number of times bundle can be accessed
|
|
718
731
|
# group_id - int64 - Owning group ID. If set, members of this group can view, edit, and share this Share Link.
|
|
732
|
+
# internal_name - string - Internal name for identifying this Share Link.
|
|
719
733
|
# note - string - Bundle internal note
|
|
720
734
|
# path_template - string - Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, `strftime` directives, and any custom form data.
|
|
721
735
|
# path_template_time_zone - string - Timezone to use when rendering timestamps in path templates.
|
|
@@ -746,6 +760,7 @@ module Files
|
|
|
746
760
|
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if params[:inbox_id] and !params[:inbox_id].is_a?(Integer)
|
|
747
761
|
raise InvalidParameterError.new("Bad parameter: max_uses must be an Integer") if params[:max_uses] and !params[:max_uses].is_a?(Integer)
|
|
748
762
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params[:group_id] and !params[:group_id].is_a?(Integer)
|
|
763
|
+
raise InvalidParameterError.new("Bad parameter: internal_name must be an String") if params[:internal_name] and !params[:internal_name].is_a?(String)
|
|
749
764
|
raise InvalidParameterError.new("Bad parameter: note must be an String") if params[:note] and !params[:note].is_a?(String)
|
|
750
765
|
raise InvalidParameterError.new("Bad parameter: path_template must be an String") if params[:path_template] and !params[:path_template].is_a?(String)
|
|
751
766
|
raise InvalidParameterError.new("Bad parameter: path_template_time_zone must be an String") if params[:path_template_time_zone] and !params[:path_template_time_zone].is_a?(String)
|
|
@@ -1075,6 +1075,33 @@ module Files
|
|
|
1075
1075
|
Api.send_request("/file_actions/move/#{@attributes[:path]}", :post, params, @options)
|
|
1076
1076
|
end
|
|
1077
1077
|
|
|
1078
|
+
# Transform a file and save the output to a destination path
|
|
1079
|
+
#
|
|
1080
|
+
# Parameters:
|
|
1081
|
+
# destination (required) - string - Destination file path for the transformed output.
|
|
1082
|
+
# transform_type (required) - string - Transform type. Supported values are `image_convert` and `document_convert`.
|
|
1083
|
+
# target_format (required) - string - Destination format to create.
|
|
1084
|
+
# width - int64 - Maximum output width for image_convert.
|
|
1085
|
+
# height - int64 - Maximum output height for image_convert.
|
|
1086
|
+
# overwrite - boolean - Overwrite existing file in the destination?
|
|
1087
|
+
def transform(params = {})
|
|
1088
|
+
params ||= {}
|
|
1089
|
+
params[:path] = @attributes[:path]
|
|
1090
|
+
raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
|
|
1091
|
+
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
1092
|
+
raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
|
|
1093
|
+
raise InvalidParameterError.new("Bad parameter: transform_type must be an String") if params[:transform_type] and !params[:transform_type].is_a?(String)
|
|
1094
|
+
raise InvalidParameterError.new("Bad parameter: target_format must be an String") if params[:target_format] and !params[:target_format].is_a?(String)
|
|
1095
|
+
raise InvalidParameterError.new("Bad parameter: width must be an Integer") if params[:width] and !params[:width].is_a?(Integer)
|
|
1096
|
+
raise InvalidParameterError.new("Bad parameter: height must be an Integer") if params[:height] and !params[:height].is_a?(Integer)
|
|
1097
|
+
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
1098
|
+
raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
|
|
1099
|
+
raise MissingParameterError.new("Parameter missing: transform_type") unless params[:transform_type]
|
|
1100
|
+
raise MissingParameterError.new("Parameter missing: target_format") unless params[:target_format]
|
|
1101
|
+
|
|
1102
|
+
Api.send_request("/file_actions/transform/#{@attributes[:path]}", :post, params, @options)
|
|
1103
|
+
end
|
|
1104
|
+
|
|
1078
1105
|
# Decrypt a GPG-encrypted file and save it to a destination path
|
|
1079
1106
|
#
|
|
1080
1107
|
# Parameters:
|
|
@@ -1331,6 +1358,33 @@ module Files
|
|
|
1331
1358
|
FileAction.new(response.data, options)
|
|
1332
1359
|
end
|
|
1333
1360
|
|
|
1361
|
+
# Transform a file and save the output to a destination path
|
|
1362
|
+
#
|
|
1363
|
+
# Parameters:
|
|
1364
|
+
# destination (required) - string - Destination file path for the transformed output.
|
|
1365
|
+
# transform_type (required) - string - Transform type. Supported values are `image_convert` and `document_convert`.
|
|
1366
|
+
# target_format (required) - string - Destination format to create.
|
|
1367
|
+
# width - int64 - Maximum output width for image_convert.
|
|
1368
|
+
# height - int64 - Maximum output height for image_convert.
|
|
1369
|
+
# overwrite - boolean - Overwrite existing file in the destination?
|
|
1370
|
+
def self.transform(path, params = {}, options = {})
|
|
1371
|
+
params ||= {}
|
|
1372
|
+
params[:path] = path
|
|
1373
|
+
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
1374
|
+
raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
|
|
1375
|
+
raise InvalidParameterError.new("Bad parameter: transform_type must be an String") if params[:transform_type] and !params[:transform_type].is_a?(String)
|
|
1376
|
+
raise InvalidParameterError.new("Bad parameter: target_format must be an String") if params[:target_format] and !params[:target_format].is_a?(String)
|
|
1377
|
+
raise InvalidParameterError.new("Bad parameter: width must be an Integer") if params[:width] and !params[:width].is_a?(Integer)
|
|
1378
|
+
raise InvalidParameterError.new("Bad parameter: height must be an Integer") if params[:height] and !params[:height].is_a?(Integer)
|
|
1379
|
+
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
1380
|
+
raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
|
|
1381
|
+
raise MissingParameterError.new("Parameter missing: transform_type") unless params[:transform_type]
|
|
1382
|
+
raise MissingParameterError.new("Parameter missing: target_format") unless params[:target_format]
|
|
1383
|
+
|
|
1384
|
+
response, options = Api.send_request("/file_actions/transform/#{params[:path]}", :post, params, options)
|
|
1385
|
+
FileAction.new(response.data, options)
|
|
1386
|
+
end
|
|
1387
|
+
|
|
1334
1388
|
# Decrypt a GPG-encrypted file and save it to a destination path
|
|
1335
1389
|
#
|
|
1336
1390
|
# Parameters:
|
data/lib/files.com/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: files.com
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.661
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- files.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|