filestack 2.6.3 → 2.6.4

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
  SHA1:
3
- metadata.gz: 782df68e180640baf40fd8f51c596fc40849eb6d
4
- data.tar.gz: 4817fda90f5dd4bba20696bac89facf9c70004ee
3
+ metadata.gz: fc5960bf27b471d69d4606b5d18b7c865983f102
4
+ data.tar.gz: ede5e631f2b94e86f8bdbd678bcadc5e9e1dfec5
5
5
  SHA512:
6
- metadata.gz: 0a2d6741c4a14cc85c1fc07f9557fba4d07b962d34757941fb09dfd4925f2cab89abfc11529e558eef1d02400c9b97fa27b2593c4b76b24a935edc6eac98fb49
7
- data.tar.gz: 5a429781202688ceddcda90e2d44d9bca1db1189e9354400e71276cd7ae8a48ecd813d6e46321835fdffd905f4b105631b55eb582a9f5684788df0d528aa25a7
6
+ metadata.gz: b0c5c7e9b0417547714d56f1ae40d41eec7769612ca0cd3e2c5bf35b05c4d83bbd9025c0762fa5a26a5f7447e77634965fddbf4ce26bbb303f36328a12f060f1
7
+ data.tar.gz: 9acb7d1d0f7c4dd776e2a6f72ad3c67dc6f4fa47874ce90e7d231b0a50821012bd21776279b8cfe1aa12e5bc082ee8a2bd654f8c10c171a42e86ceef71c29493
@@ -1,5 +1,8 @@
1
1
  # Filestack-Ruby Changelog
2
2
 
3
+ ## 2.6.4 (November 4, 2019)
4
+ - Fix issue with file upload
5
+
3
6
  ## 2.6.3 (August 12, 2019)
4
7
  - Add animate to transformations
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.6.3
1
+ 2.6.4
@@ -114,7 +114,7 @@
114
114
  </span><span class='tstring_content'> partial_pixelate</span><span class='words_sep'> </span><span class='tstring_content'>partial_blur</span><span class='words_sep'> </span><span class='tstring_content'>collage</span><span class='words_sep'> </span><span class='tstring_content'>upscale</span><span class='words_sep'> </span><span class='tstring_content'>enhance</span><span class='words_sep'>
115
115
  </span><span class='tstring_content'> redeye</span><span class='words_sep'> </span><span class='tstring_content'>ascii</span><span class='words_sep'> </span><span class='tstring_content'>filetype_conversion</span><span class='words_sep'> </span><span class='tstring_content'>quality</span><span class='words_sep'> </span><span class='tstring_content'>urlscreenshot</span><span class='words_sep'>
116
116
  </span><span class='tstring_content'> no_metadata</span><span class='words_sep'></span><span class='tstring_content'> fallback</span><span class='words_sep'></span><span class='tstring_content'> pdfinfo</span><span class='words_sep'></span><span class='tstring_content'> pdfconvert</span><span class='words_sep'></span><span class='tstring_content'> cache</span><span class='words_sep'></span><span class='tstring_content'> auto_image</span><span class='words_sep'>
117
- </span><span class='tstring_content'> minify_js</span><span class='words_sep'></span><span class='tstring_content'> minify_css</span><span class='words_sep'></span><span class='tstring_content'> animate</span><span class='words_sep'></span>
117
+ </span><span class='tstring_content'> minify_js</span><span class='words_sep'></span><span class='tstring_content'> minify_css</span><span class='words_sep'></span><span class='tstring_content'> animate</span><span class='words_sep'></span><span class='tstring_content'> video_convert</span><span class='words_sep'></span><span class='tstring_content'> video_playlist</span><span class='words_sep'></span>
118
118
  <span class='tstring_end'>]</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
119
119
 
120
120
  </dl>
@@ -37,6 +37,6 @@ class TransformConfig
37
37
  partial_pixelate partial_blur collage upscale enhance
38
38
  redeye ascii filetype_conversion quality urlscreenshot
39
39
  no_metadata fallback pdfinfo pdfconvert cache auto_image
40
- minify_js minify_css animate
40
+ minify_js minify_css animate video_convert video_playlist
41
41
  ].freeze
42
42
  end
@@ -1,5 +1,5 @@
1
1
  module Filestack
2
2
  module Ruby
3
- VERSION = '2.6.3'.freeze
3
+ VERSION = '2.6.4'.freeze
4
4
  end
5
5
  end
@@ -45,7 +45,7 @@ module MultipartUploadUtils
45
45
  # multipart uploads
46
46
  #
47
47
  # @return [Typhoeus::Response]
48
- def multipart_start(apikey, filename, filesize, mimetype, security, storage, options = {})
48
+ def multipart_start(apikey, filename, filesize, mimetype, security, storage, options = {}, intelligent)
49
49
  params = {
50
50
  apikey: apikey,
51
51
  filename: filename,
@@ -53,8 +53,9 @@ module MultipartUploadUtils
53
53
  size: filesize,
54
54
  store_location: storage,
55
55
  file: Tempfile.new(filename),
56
- 'multipart' => 'true'
56
+ multipart: intelligent
57
57
  }
58
+
58
59
  options = multipart_options(options)
59
60
  params = params.merge!(options) if options
60
61
 
@@ -204,35 +205,20 @@ module MultipartUploadUtils
204
205
  #
205
206
  # @return [Typhoeus::Response]
206
207
  def multipart_complete(apikey, filename, filesize, mimetype, start_response, parts_and_etags, options, storage, intelligent = false)
207
- if !intelligent
208
- data = {
209
- apikey: apikey,
210
- uri: start_response['uri'],
211
- region: start_response['region'],
212
- upload_id: start_response['upload_id'],
213
- filename: filename,
214
- size: filesize,
215
- mimetype: mimetype,
216
- parts: parts_and_etags.join(';'),
217
- store_location: storage,
218
- file: Tempfile.new(filename)
219
- }
220
- else
221
- data = {
222
- apikey: apikey,
223
- uri: start_response['uri'],
224
- region: start_response['region'],
225
- upload_id: start_response['upload_id'],
226
- filename: filename,
227
- size: filesize,
228
- mimetype: mimetype,
229
- store_location: storage,
230
- file: Tempfile.new(filename),
231
- 'multipart' => 'true'
232
- }
233
- end
208
+ data = {
209
+ apikey: apikey,
210
+ uri: start_response['uri'],
211
+ region: start_response['region'],
212
+ upload_id: start_response['upload_id'],
213
+ filename: filename,
214
+ size: filesize,
215
+ mimetype: mimetype,
216
+ store_location: storage,
217
+ file: Tempfile.new(filename)
218
+ }
234
219
  options = multipart_options(options)
235
- data = data.merge!(options) if options
220
+ data.merge!(options) if options
221
+ data.merge!(intelligent ? { multipart: intelligent } : { parts: parts_and_etags.join(';') })
236
222
 
237
223
  Typhoeus.post(
238
224
  FilestackConfig::MULTIPART_COMPLETE_URL, body: data,
@@ -253,7 +239,7 @@ module MultipartUploadUtils
253
239
  def multipart_upload(apikey, filepath, security, options, timeout, storage, intelligent: false)
254
240
  filename, filesize, mimetype = get_file_info(filepath)
255
241
  start_response = multipart_start(
256
- apikey, filename, filesize, mimetype, security, storage, options
242
+ apikey, filename, filesize, mimetype, security, storage, options, intelligent
257
243
  )
258
244
 
259
245
  unless start_response['upload_type'].nil?
@@ -91,7 +91,8 @@ module UploadUtils
91
91
  base = "#{base}&signature=#{signature}&policy=#{policy}"
92
92
  end
93
93
 
94
- response = make_call(base, 'post', parameters: data)
94
+ response = Typhoeus.post(base, body: data, headers: FilestackConfig::HEADERS)
95
+
95
96
  if response.code == 200
96
97
  response_body = JSON.parse(response.body)
97
98
  handle = response_body['url'].split('/').last
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.6.3
4
+ version: 2.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filestack
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-12 00:00:00.000000000 Z
11
+ date: 2019-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus