filestack 2.8.1 → 2.9.6

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: 77f23edf489898b7e03305bca017f6eb519cf3995aecd120908a6d01042ca60d
4
- data.tar.gz: bcdc3b18c9ecd5ebbc886cfd518a08b2ba0eccdc994f24e673095fdfdc84945f
3
+ metadata.gz: a6257a989f754721ccea17bb8ba9ec05e3b919e224599239e6c4b07596be95db
4
+ data.tar.gz: 203b1b4d9cb0627115e13b2af655edba664ae8743c7e9772fdb5641ceadeb0e6
5
5
  SHA512:
6
- metadata.gz: 596a72ca7995f8ba53a63d78f6ae2b0994f5c02b5b8e38fb273f0b6aefb8f657638544ee2775320d7d8c472dee8879bf5e7765de0f8ecf96ed93c973eeb1707a
7
- data.tar.gz: e55b56cfefdfeaa5bffbd52f83af5d9d92ebf7952150c02fec12a43f256a3f8b2e8575627593f12fe826ac1004104e4c42bf45c1e7c8748609730faaf6ced218
6
+ metadata.gz: 796f587b6695c730e884aee7731673b98ac9f9b22d5ba33473d7236ceae4222ad8f8f1fe51b4362f50b137743be308b6096e827cc9ea634fb4352f40aa421cd3
7
+ data.tar.gz: 9fe556c481445e41fe51e4d8d1a15bae7bf8f9ffc2753282a91b350221c70705727fe4f67499a887416087eda98c6238959e5c3e3eb34aa3afe97d8215150f52
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Filestack-Ruby Changelog
2
2
 
3
+ ## 2.9.6 (Oct 29, 2021)
4
+ - Return response body on upload complete to get workflows jobid
5
+
6
+ ## 2.9.5 (Oct 19, 2021)
7
+ - Add url encoding - fix the issue with transformation crop dim
8
+
9
+ ## 2.9.4 (July 26, 2021)
10
+ - Change the version of mini_mime
11
+
12
+ ## 2.9.3 (June 7, 2021)
13
+ - Handle nil mimetype of file
14
+
15
+ ## 2.9.2 (May 5, 2021)
16
+ - Replace mimemagic with mini_magic
17
+
18
+ ## 2.9.1 (March 26, 2021)
19
+ - Update version of mimemagic gem to 0.3.9
20
+
21
+ ## 2.9.0 (March 25, 2021)
22
+ - Update version of mimemagic gem to 0.3.8
23
+
3
24
  ## 2.8.1 (October 1, 2020)
4
25
  - Add rescue and raises body message on upload
5
26
 
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
@@ -114,6 +124,19 @@ client = FilestackClient.new('YOUR_API_KEY', security: security)
114
124
  ### Using FilestackFilelinks
115
125
  FilestackFilelink objects are representation of a file handle. You can download, get raw file content, delete and overwrite file handles directly. Security is required for overwrite and delete methods.
116
126
 
127
+ Initialize the filelink using the file handle, your API key, and security if required. The file handle is the string following the last slash `/` in the file URL.
128
+
129
+ ```ruby
130
+ filelink = FilestackFilelink.new(handle, apikey: 'YOUR_API_KEY', security: security_object)
131
+ ```
132
+
133
+ ### Deletion
134
+ You can delete a file by simply calling `delete` on the filelink.
135
+
136
+ ```ruby
137
+ filelink.delete
138
+ ```
139
+
117
140
  ### Transformations
118
141
  Transforms can be initiated one of two ways. The first, by calling ```transform``` on a filelink:
119
142
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.8.1
1
+ 2.9.6
@@ -730,7 +730,7 @@ call.</p>
730
730
  <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Overwrite requires security</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_security'>security</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
731
731
 
732
732
  <span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_filepath'>filepath</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>r</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
733
- <span class='id identifier rubyid_mimetype'>mimetype</span> <span class='op'>=</span> <span class='const'>MimeMagic</span><span class='period'>.</span><span class='id identifier rubyid_by_magic'>by_magic</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
733
+ <span class='id identifier rubyid_mimetype'>mimetype</span> <span class='op'>=</span> <span class='const'>MiniMime</span><span class='period'>.</span><span class='id identifier rubyid_lookup_by_filename'>lookup_by_filename</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_content_type'>content_type</span>
734
734
  <span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
735
735
 
736
736
  <span class='id identifier rubyid_signature'>signature</span> <span class='op'>=</span> <span class='id identifier rubyid_security'>security</span><span class='period'>.</span><span class='id identifier rubyid_signature'>signature</span>