files.com 1.0.491 → 1.0.493
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/remote_server.md +8 -0
- data/lib/files.com/models/file.rb +4 -2
- data/lib/files.com/models/remote_server.rb +12 -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: 370ee5cea2aae6cd422295923ca4753c2b7299814501e51dcc7410d92df351a3
|
4
|
+
data.tar.gz: d276fcf12dc12f9a451cecc624083a2b53b4760db638ce384a1908a04bd0f152
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 645d2f8c9942cb0bc12994340fa03c2449b6d0e604df669d91d208c24e3ca5fb453d387d1ffc7942f1043cef8f66256497d97a263a645d6633680c65cd054cfc
|
7
|
+
data.tar.gz: f458b3f4b2a230ba2100d0d09f0f6d4672e45fc5562bd180f25311f8105a4593a9612c88f3690c72f46fb1c277371d6e1d4afab5491b5a0dadcecd30587e1b5a
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.493
|
data/docs/remote_server.md
CHANGED
@@ -39,6 +39,7 @@
|
|
39
39
|
"azure_blob_storage_account": "storage-account-name",
|
40
40
|
"azure_blob_storage_sas_token": "storage-sas-token",
|
41
41
|
"azure_blob_storage_container": "container-name",
|
42
|
+
"azure_blob_storage_hierarchical_namespace": true,
|
42
43
|
"azure_files_storage_account": "storage-account-name",
|
43
44
|
"azure_files_storage_sas_token": "storage-sas-token",
|
44
45
|
"azure_files_storage_share_name": "share-name",
|
@@ -97,6 +98,7 @@
|
|
97
98
|
* `azure_blob_storage_account` (string): Azure Blob Storage Account name
|
98
99
|
* `azure_blob_storage_sas_token` (string): Shared Access Signature (SAS) token
|
99
100
|
* `azure_blob_storage_container` (string): Azure Blob Storage Container name
|
101
|
+
* `azure_blob_storage_hierarchical_namespace` (boolean): Enable when storage account has hierarchical namespace feature enabled
|
100
102
|
* `azure_files_storage_account` (string): Azure File Storage Account name
|
101
103
|
* `azure_files_storage_sas_token` (string): Shared Access Signature (SAS) token
|
102
104
|
* `azure_files_storage_share_name` (string): Azure File Storage Share name
|
@@ -211,6 +213,7 @@ Files::RemoteServer.create(
|
|
211
213
|
one_drive_account_type: "personal",
|
212
214
|
azure_blob_storage_account: "storage-account-name",
|
213
215
|
azure_blob_storage_container: "container-name",
|
216
|
+
azure_blob_storage_hierarchical_namespace: true,
|
214
217
|
azure_blob_storage_sas_token: "storage-sas-token",
|
215
218
|
azure_files_storage_account: "storage-account-name",
|
216
219
|
azure_files_storage_share_name: "share-name",
|
@@ -275,6 +278,7 @@ Files::RemoteServer.create(
|
|
275
278
|
* `one_drive_account_type` (string): Either personal or business_other account types
|
276
279
|
* `azure_blob_storage_account` (string): Azure Blob Storage Account name
|
277
280
|
* `azure_blob_storage_container` (string): Azure Blob Storage Container name
|
281
|
+
* `azure_blob_storage_hierarchical_namespace` (boolean): Enable when storage account has hierarchical namespace feature enabled
|
278
282
|
* `azure_blob_storage_sas_token` (string): Shared Access Signature (SAS) token
|
279
283
|
* `azure_files_storage_account` (string): Azure File Storage Account name
|
280
284
|
* `azure_files_storage_share_name` (string): Azure File Storage Share name
|
@@ -370,6 +374,7 @@ Files::RemoteServer.update(id,
|
|
370
374
|
one_drive_account_type: "personal",
|
371
375
|
azure_blob_storage_account: "storage-account-name",
|
372
376
|
azure_blob_storage_container: "container-name",
|
377
|
+
azure_blob_storage_hierarchical_namespace: true,
|
373
378
|
azure_blob_storage_sas_token: "storage-sas-token",
|
374
379
|
azure_files_storage_account: "storage-account-name",
|
375
380
|
azure_files_storage_share_name: "share-name",
|
@@ -435,6 +440,7 @@ Files::RemoteServer.update(id,
|
|
435
440
|
* `one_drive_account_type` (string): Either personal or business_other account types
|
436
441
|
* `azure_blob_storage_account` (string): Azure Blob Storage Account name
|
437
442
|
* `azure_blob_storage_container` (string): Azure Blob Storage Container name
|
443
|
+
* `azure_blob_storage_hierarchical_namespace` (boolean): Enable when storage account has hierarchical namespace feature enabled
|
438
444
|
* `azure_blob_storage_sas_token` (string): Shared Access Signature (SAS) token
|
439
445
|
* `azure_files_storage_account` (string): Azure File Storage Account name
|
440
446
|
* `azure_files_storage_share_name` (string): Azure File Storage Share name
|
@@ -547,6 +553,7 @@ remote_server.update(
|
|
547
553
|
one_drive_account_type: "personal",
|
548
554
|
azure_blob_storage_account: "storage-account-name",
|
549
555
|
azure_blob_storage_container: "container-name",
|
556
|
+
azure_blob_storage_hierarchical_namespace: true,
|
550
557
|
azure_blob_storage_sas_token: "storage-sas-token",
|
551
558
|
azure_files_storage_account: "storage-account-name",
|
552
559
|
azure_files_storage_share_name: "share-name",
|
@@ -612,6 +619,7 @@ remote_server.update(
|
|
612
619
|
* `one_drive_account_type` (string): Either personal or business_other account types
|
613
620
|
* `azure_blob_storage_account` (string): Azure Blob Storage Account name
|
614
621
|
* `azure_blob_storage_container` (string): Azure Blob Storage Container name
|
622
|
+
* `azure_blob_storage_hierarchical_namespace` (boolean): Enable when storage account has hierarchical namespace feature enabled
|
615
623
|
* `azure_blob_storage_sas_token` (string): Shared Access Signature (SAS) token
|
616
624
|
* `azure_files_storage_account` (string): Azure File Storage Account name
|
617
625
|
* `azure_files_storage_share_name` (string): Azure File Storage Share name
|
@@ -137,9 +137,10 @@ module Files
|
|
137
137
|
def self.upload_chunks(io, path, options, upload = nil, etags = [], params: {})
|
138
138
|
etags ||= []
|
139
139
|
bytes_written = 0
|
140
|
+
request_parts = options[:size] and options[:size] < 5.megabytes ? 1 : 5
|
140
141
|
loop do
|
141
|
-
begin_upload = File.begin_upload(path, params.merge(ref: upload&.ref, part: (upload&.part_number || 0) + 1), options)
|
142
|
-
upload = begin_upload.is_a?(Enumerable) ? begin_upload.
|
142
|
+
begin_upload = File.begin_upload(path, params.merge(ref: upload&.ref, parts: request_parts, part: (upload&.part_number || 0) + 1), options) if begin_upload.nil? || begin_upload.empty?
|
143
|
+
upload = begin_upload.is_a?(Enumerable) ? begin_upload.shift : begin_upload
|
143
144
|
buf = io.read(upload.partsize) || ""
|
144
145
|
bytes_written += buf.length
|
145
146
|
method = upload.http_method.downcase.to_sym
|
@@ -152,6 +153,7 @@ module Files
|
|
152
153
|
def self.upload_file(path, destination = nil, options = {}, params: {})
|
153
154
|
local_file = ::File.open(path, 'r')
|
154
155
|
destination ||= File.basename(path)
|
156
|
+
params[:size] ||= local_file.size
|
155
157
|
upload, etags = upload_chunks(local_file, destination, options, params: params)
|
156
158
|
|
157
159
|
params = {
|
@@ -324,6 +324,15 @@ module Files
|
|
324
324
|
@attributes[:azure_blob_storage_container] = value
|
325
325
|
end
|
326
326
|
|
327
|
+
# boolean - Enable when storage account has hierarchical namespace feature enabled
|
328
|
+
def azure_blob_storage_hierarchical_namespace
|
329
|
+
@attributes[:azure_blob_storage_hierarchical_namespace]
|
330
|
+
end
|
331
|
+
|
332
|
+
def azure_blob_storage_hierarchical_namespace=(value)
|
333
|
+
@attributes[:azure_blob_storage_hierarchical_namespace] = value
|
334
|
+
end
|
335
|
+
|
327
336
|
# string - Azure File Storage Account name
|
328
337
|
def azure_files_storage_account
|
329
338
|
@attributes[:azure_files_storage_account]
|
@@ -732,6 +741,7 @@ module Files
|
|
732
741
|
# one_drive_account_type - string - Either personal or business_other account types
|
733
742
|
# azure_blob_storage_account - string - Azure Blob Storage Account name
|
734
743
|
# azure_blob_storage_container - string - Azure Blob Storage Container name
|
744
|
+
# azure_blob_storage_hierarchical_namespace - boolean - Enable when storage account has hierarchical namespace feature enabled
|
735
745
|
# azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
|
736
746
|
# azure_files_storage_account - string - Azure File Storage Account name
|
737
747
|
# azure_files_storage_share_name - string - Azure File Storage Share name
|
@@ -932,6 +942,7 @@ module Files
|
|
932
942
|
# one_drive_account_type - string - Either personal or business_other account types
|
933
943
|
# azure_blob_storage_account - string - Azure Blob Storage Account name
|
934
944
|
# azure_blob_storage_container - string - Azure Blob Storage Container name
|
945
|
+
# azure_blob_storage_hierarchical_namespace - boolean - Enable when storage account has hierarchical namespace feature enabled
|
935
946
|
# azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
|
936
947
|
# azure_files_storage_account - string - Azure File Storage Account name
|
937
948
|
# azure_files_storage_share_name - string - Azure File Storage Share name
|
@@ -1096,6 +1107,7 @@ module Files
|
|
1096
1107
|
# one_drive_account_type - string - Either personal or business_other account types
|
1097
1108
|
# azure_blob_storage_account - string - Azure Blob Storage Account name
|
1098
1109
|
# azure_blob_storage_container - string - Azure Blob Storage Container name
|
1110
|
+
# azure_blob_storage_hierarchical_namespace - boolean - Enable when storage account has hierarchical namespace feature enabled
|
1099
1111
|
# azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
|
1100
1112
|
# azure_files_storage_account - string - Azure File Storage Account name
|
1101
1113
|
# azure_files_storage_share_name - string - Azure File Storage Share name
|
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.0.
|
4
|
+
version: 1.0.493
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|