filestack 2.9.5 → 2.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +10 -0
- data/VERSION +1 -1
- data/lib/filestack/models/filelink.rb +3 -2
- data/lib/filestack/models/filestack_client.rb +1 -1
- data/lib/filestack/ruby/version.rb +1 -1
- data/lib/filestack/utils/utils.rb +2 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c847c2a9ed6e1078e3c19e969659eb4171450f8eae8e8f8613f197b12bda479b
|
4
|
+
data.tar.gz: e34883049cb327b4dedfbeada46a941a5d34bc046dcabdae45e392fa7d6dda82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2f2ee126ae57f1f2222690a5d33c059a84273309e3f91933d2f4a4fcb85769dddcfb0fd4a6629c229218992870d4d0f985c371eb562b591f5b1ee153a4f0989
|
7
|
+
data.tar.gz: ed477ccd9f6404f6c23fffa88037dbb8e2e780b34e5264864da52c807419e9170a7c443924b69a57693141ac28eca69d80d513523437fc764ffcf63c1c7ee054
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Filestack-Ruby Changelog
|
2
2
|
|
3
|
+
## 2.9.7 (Sept 07, 2023)
|
4
|
+
- Replace URI encode to ERB
|
5
|
+
|
6
|
+
## 2.9.6 (Oct 29, 2021)
|
7
|
+
- Return response body on upload complete to get workflows jobid
|
8
|
+
|
3
9
|
## 2.9.5 (Oct 19, 2021)
|
4
10
|
- Add url encoding - fix the issue with transformation crop dim
|
5
11
|
|
data/README.md
CHANGED
@@ -60,6 +60,13 @@ filelink = client.upload(external_url: 'http://domain.com/image.png')
|
|
60
60
|
|
61
61
|
file = StringIO.new
|
62
62
|
filelink = client.upload(io: file)
|
63
|
+
|
64
|
+
|
65
|
+
# Return response body on upload complete
|
66
|
+
puts filelink.upload_response
|
67
|
+
|
68
|
+
# Return uploaded filelink handle
|
69
|
+
puts filelink.handle
|
63
70
|
```
|
64
71
|
|
65
72
|
To upload a local, an IO object and an external file with following optional options:
|
@@ -101,6 +108,9 @@ filelink = client.upload(filepath: '/path/to/file', options: { workflows: ["work
|
|
101
108
|
#OR
|
102
109
|
|
103
110
|
filelink = client.upload(external_url: 'http://someurl.com/image.png', options: { workflows: ["workflow_id_1"] })
|
111
|
+
|
112
|
+
# Return workflows jobids on upload complete
|
113
|
+
puts filelink.upload_response["workflows"]
|
104
114
|
```
|
105
115
|
|
106
116
|
### Security
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.9.
|
1
|
+
2.9.7
|
@@ -10,7 +10,7 @@ require 'filestack/mixins/filestack_common'
|
|
10
10
|
class FilestackFilelink
|
11
11
|
include FilestackCommon
|
12
12
|
include UploadUtils
|
13
|
-
attr_reader :handle, :apikey, :security
|
13
|
+
attr_reader :handle, :apikey, :security, :upload_response
|
14
14
|
|
15
15
|
# Initialize FilestackFilelink
|
16
16
|
#
|
@@ -18,10 +18,11 @@ class FilestackFilelink
|
|
18
18
|
# @param [String] apikey Your Filestack API Key (optional)
|
19
19
|
# @param [FilestackSecurity] security Filestack security object, if
|
20
20
|
# security is enabled.
|
21
|
-
def initialize(handle, apikey: nil, security: nil)
|
21
|
+
def initialize(handle, apikey: nil, security: nil, upload_response: nil)
|
22
22
|
@handle = handle
|
23
23
|
@apikey = apikey
|
24
24
|
@security = security
|
25
|
+
@upload_response = upload_response
|
25
26
|
end
|
26
27
|
|
27
28
|
# Get content of filelink
|
@@ -42,7 +42,7 @@ class FilestackClient
|
|
42
42
|
multipart_upload(@apikey, filepath, io, @security, options, timeout, storage, intelligent)
|
43
43
|
end
|
44
44
|
|
45
|
-
FilestackFilelink.new(response['handle'], security: @security, apikey: @apikey)
|
45
|
+
FilestackFilelink.new(response['handle'], security: @security, apikey: @apikey, upload_response: response)
|
46
46
|
end
|
47
47
|
# Transform an external URL
|
48
48
|
#
|
@@ -58,7 +58,7 @@ module UploadUtils
|
|
58
58
|
FilestackConfig::HEADERS
|
59
59
|
end
|
60
60
|
Typhoeus.public_send(
|
61
|
-
action, URI.
|
61
|
+
action, URI::Parser.new.escape(url), params: parameters, headers: headers
|
62
62
|
)
|
63
63
|
end
|
64
64
|
|
@@ -102,8 +102,7 @@ module UploadUtils
|
|
102
102
|
if response.code == 200
|
103
103
|
begin
|
104
104
|
response_body = JSON.parse(response.body)
|
105
|
-
|
106
|
-
return { 'handle' => handle }
|
105
|
+
return response_body
|
107
106
|
rescue
|
108
107
|
raise response.body
|
109
108
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filestack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Filestack
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -201,7 +201,7 @@ homepage: https://github.com/filestack/filestack-ruby
|
|
201
201
|
licenses:
|
202
202
|
- MIT
|
203
203
|
metadata: {}
|
204
|
-
post_install_message:
|
204
|
+
post_install_message:
|
205
205
|
rdoc_options: []
|
206
206
|
require_paths:
|
207
207
|
- lib
|
@@ -216,8 +216,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
216
|
- !ruby/object:Gem::Version
|
217
217
|
version: '0'
|
218
218
|
requirements: []
|
219
|
-
rubygems_version: 3.
|
220
|
-
signing_key:
|
219
|
+
rubygems_version: 3.1.2
|
220
|
+
signing_key:
|
221
221
|
specification_version: 4
|
222
222
|
summary: Official Ruby SDK for the Filestack API
|
223
223
|
test_files: []
|