filestack 2.7.0 → 2.9.2

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: 36cd3251f64e64ffcdb9d42c73cbf6d49bcda8a2533cb8053e0087229a077bf2
4
- data.tar.gz: f2e38e698557c0b336c332be5b68775fe2624e046a56e1c521717554f23b6495
3
+ metadata.gz: 77cdeeaa1226f25d1c5eba7ac7afe6d378dd9186ca312d04702fc4f840afa77b
4
+ data.tar.gz: 0ea80120de3f54a0e2ee5d6c0ed1d2a6fb7d720259c1ac5447e80d98c374768d
5
5
  SHA512:
6
- metadata.gz: 26a1b21b1ad69ae42708e94323e28d7656881824e668677b0dc27a4bb13a035ed6f5b104f90615a0e53bf3b454621fa3a3e129a6a412eed15dd7271f33100f84
7
- data.tar.gz: 4d2c6c3e96da48df28e067f6990e3313669ffb2cf0f33f62964db5f708b42b0818c9992cec713c0b70acc6db72425bb727545726a1757c9c64c9dc7addcf6090
6
+ metadata.gz: 41aaf72567d547bce5dbdfff016558a736f91f26ad6b52e70f242c9dc3d6a9d98aec65ed1532e0378c55e892eed465b8a3bba9a42ff92de387291cc854e54840
7
+ data.tar.gz: 83081bee7119eed5d65d3d2f55aa54d8a61f81621002ff9a74de974ad794992a49db51266a544a95d2807083995af742d55b77c130f09684ed6b228f6f7b5e81
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Filestack-Ruby Changelog
2
2
 
3
+ ## 2.9.2 (May 5, 2021)
4
+ - Replace mimemagic with mini_magic
5
+
6
+ ## 2.9.1 (March 26, 2021)
7
+ - Update version of mimemagic gem to 0.3.9
8
+
9
+ ## 2.9.0 (March 25, 2021)
10
+ - Update version of mimemagic gem to 0.3.8
11
+
12
+ ## 2.8.1 (October 1, 2020)
13
+ - Add rescue and raises body message on upload
14
+
15
+ ## 2.8.0 (September 29, 2020)
16
+ - Add IO object upload
17
+
3
18
  ## 2.7.0 (September 28, 2020)
4
19
  - Add workflows
5
20
 
data/README.md CHANGED
@@ -55,13 +55,33 @@ filelink = client.upload(filepath: '/path/to/localfile')
55
55
  # OR
56
56
 
57
57
  filelink = client.upload(external_url: 'http://domain.com/image.png')
58
+
59
+ # OR
60
+
61
+ file = StringIO.new
62
+ filelink = client.upload(io: file)
58
63
  ```
59
64
 
60
- To upload a local and an external file with query parameters:
65
+ To upload a local, an IO object and an external file with following optional options:
66
+
61
67
  ```ruby
62
- filelink = client.upload(filepath: '/path/to/localfile', options: { mimetype: 'image/png' })
68
+ options = {
69
+ filename: 'string',
70
+ location: 'string',
71
+ path: 'string',
72
+ container: 'string',
73
+ mimetype: 'string',
74
+ region: 'string',
75
+ workflows: ['workflow-id-1', 'workflow-id-2'],
76
+ upload_tags: {
77
+ key: 'value',
78
+ key2: 'value'
79
+ }
80
+ }
81
+
82
+ filelink = client.upload(filepath: '/path/to/localfile', options: { mimetype: 'image/png', filename: 'custom_filename.png' })
63
83
 
64
- filelink = client.upload(external_url: 'http://domain.com/image.png', options: { mimetype: 'image/jpeg' })
84
+ filelink = client.upload(external_url: 'http://domain.com/image.png', options: { mimetype: 'image/jpeg', filename: 'custom_filename.png' })
65
85
  ```
66
86
 
67
87
  To store file on `dropbox`, `azure`, `gcs` or `rackspace`, you must have the chosen provider configured in the developer portal to enable this feature. By default the file is stored on `s3`. You can add more details of the storage in `options`.
@@ -94,6 +114,19 @@ client = FilestackClient.new('YOUR_API_KEY', security: security)
94
114
  ### Using FilestackFilelinks
95
115
  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.
96
116
 
117
+ 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.
118
+
119
+ ```ruby
120
+ filelink = FilestackFilelink.new(handle, apikey: 'YOUR_API_KEY', security: security_object)
121
+ ```
122
+
123
+ ### Deletion
124
+ You can delete a file by simply calling `delete` on the filelink.
125
+
126
+ ```ruby
127
+ filelink.delete
128
+ ```
129
+
97
130
  ### Transformations
98
131
  Transforms can be initiated one of two ways. The first, by calling ```transform``` on a filelink:
99
132
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.7.0
1
+ 2.9.2
@@ -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>
@@ -5,9 +5,9 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>
7
7
  Module: MultipartUploadUtils
8
-
8
+
9
9
  &mdash; Documentation by YARD 0.9.9
10
-
10
+
11
11
  </title>
12
12
 
13
13
  <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
@@ -35,16 +35,16 @@
35
35
  <div id="main" tabindex="-1">
36
36
  <div id="header">
37
37
  <div id="menu">
38
-
38
+
39
39
  <a href="_index.html">Index (M)</a> &raquo;
40
-
41
-
40
+
41
+
42
42
  <span class="title">MultipartUploadUtils</span>
43
-
43
+
44
44
  </div>
45
45
 
46
46
  <div id="search">
47
-
47
+
48
48
  <a class="full_list_link" id="class_list_link"
49
49
  href="class_list.html">
50
50
 
@@ -54,50 +54,50 @@
54
54
  <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
55
  </svg>
56
56
  </a>
57
-
57
+
58
58
  </div>
59
59
  <div class="clear"></div>
60
60
  </div>
61
61
 
62
62
  <div id="content"><h1>Module: MultipartUploadUtils
63
-
64
-
65
-
63
+
64
+
65
+
66
66
  </h1>
67
67
  <div class="box_info">
68
-
69
68
 
70
-
71
-
72
-
73
-
74
-
75
69
 
76
-
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
77
  <dl>
78
78
  <dt>Included in:</dt>
79
79
  <dd><span class='object_link'><a href="FilestackClient.html" title="FilestackClient (class)">FilestackClient</a></span></dd>
80
80
  </dl>
81
-
82
81
 
83
-
82
+
83
+
84
84
  <dl>
85
85
  <dt>Defined in:</dt>
86
86
  <dd>lib/filestack/utils/multipart_upload_utils.rb</dd>
87
87
  </dl>
88
-
88
+
89
89
  </div>
90
90
 
91
91
  <h2>Overview</h2><div class="docstring">
92
92
  <div class="discussion">
93
-
93
+
94
94
  <p>Includes all the utility functions for Filestack multipart uploads</p>
95
95
 
96
96
 
97
97
  </div>
98
98
  </div>
99
99
  <div class="tags">
100
-
100
+
101
101
 
102
102
  </div>
103
103
 
@@ -106,201 +106,201 @@
106
106
 
107
107
 
108
108
 
109
-
109
+
110
110
  <h2>
111
111
  Instance Method Summary
112
112
  <small><a href="#" class="summary_toggle">collapse</a></small>
113
113
  </h2>
114
114
 
115
115
  <ul class="summary">
116
-
116
+
117
117
  <li class="public ">
118
118
  <span class="summary_signature">
119
-
119
+
120
120
  <a href="#create_upload_jobs-instance_method" title="#create_upload_jobs (instance method)">#<strong>create_upload_jobs</strong>(apikey, filename, filepath, filesize, start_response, options) &#x21d2; Array </a>
121
-
122
121
 
123
-
122
+
123
+
124
124
  </span>
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
134
  <span class="summary_desc"><div class='inline'>
135
135
  <p>Create array of jobs for parallel uploading.</p>
136
136
  </div></span>
137
-
137
+
138
138
  </li>
139
139
 
140
-
140
+
141
141
  <li class="public ">
142
142
  <span class="summary_signature">
143
-
143
+
144
144
  <a href="#get_file_info-instance_method" title="#get_file_info (instance method)">#<strong>get_file_info</strong>(file) &#x21d2; Object </a>
145
-
146
145
 
147
-
146
+
147
+
148
148
  </span>
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
158
  <span class="summary_desc"><div class='inline'></div></span>
159
-
159
+
160
160
  </li>
161
161
 
162
-
162
+
163
163
  <li class="public ">
164
164
  <span class="summary_signature">
165
-
165
+
166
166
  <a href="#multipart_complete-instance_method" title="#multipart_complete (instance method)">#<strong>multipart_complete</strong>(apikey, filename, filesize, mimetype, start_response, parts_and_etags, options, intelligent = false) &#x21d2; Typhoeus::Response </a>
167
-
168
167
 
169
-
168
+
169
+
170
170
  </span>
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
180
  <span class="summary_desc"><div class='inline'>
181
181
  <p>Send complete call to multipart endpoint.</p>
182
182
  </div></span>
183
-
183
+
184
184
  </li>
185
185
 
186
-
186
+
187
187
  <li class="public ">
188
188
  <span class="summary_signature">
189
-
189
+
190
190
  <a href="#multipart_start-instance_method" title="#multipart_start (instance method)">#<strong>multipart_start</strong>(apikey, filename, filesize, mimetype, security, options) &#x21d2; Typhoeus::Response </a>
191
-
192
191
 
193
-
192
+
193
+
194
194
  </span>
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
204
  <span class="summary_desc"><div class='inline'>
205
205
  <p>Send start response to multipart endpoint.</p>
206
206
  </div></span>
207
-
207
+
208
208
  </li>
209
209
 
210
-
210
+
211
211
  <li class="public ">
212
212
  <span class="summary_signature">
213
-
213
+
214
214
  <a href="#multipart_upload-instance_method" title="#multipart_upload (instance method)">#<strong>multipart_upload</strong>(apikey, filepath, security, options, timeout, intelligent: false) &#x21d2; Typhoeus::Response </a>
215
-
216
215
 
217
-
216
+
217
+
218
218
  </span>
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
228
  <span class="summary_desc"><div class='inline'>
229
229
  <p>Run entire multipart process through with file and options.</p>
230
230
  </div></span>
231
-
231
+
232
232
  </li>
233
233
 
234
-
234
+
235
235
  <li class="public ">
236
236
  <span class="summary_signature">
237
-
237
+
238
238
  <a href="#run_uploads-instance_method" title="#run_uploads (instance method)">#<strong>run_uploads</strong>(jobs, apikey, filepath, options) &#x21d2; Array </a>
239
-
240
239
 
241
-
240
+
241
+
242
242
  </span>
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
252
  <span class="summary_desc"><div class='inline'>
253
253
  <p>Runs all jobs in parallel.</p>
254
254
  </div></span>
255
-
255
+
256
256
  </li>
257
257
 
258
-
258
+
259
259
  <li class="public ">
260
260
  <span class="summary_signature">
261
-
261
+
262
262
  <a href="#upload_chunk-instance_method" title="#upload_chunk (instance method)">#<strong>upload_chunk</strong>(job, apikey, filepath, options) &#x21d2; Typhoeus::Response </a>
263
-
264
263
 
265
-
264
+
265
+
266
266
  </span>
267
-
268
-
269
-
270
-
271
-
272
-
273
-
274
-
275
-
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
276
  <span class="summary_desc"><div class='inline'>
277
277
  <p>Uploads one chunk of the file.</p>
278
278
  </div></span>
279
-
279
+
280
280
  </li>
281
281
 
282
-
282
+
283
283
  </ul>
284
-
284
+
285
285
 
286
286
 
287
287
 
288
288
  <div id="instance_method_details" class="method_details_list">
289
289
  <h2>Instance Method Details</h2>
290
290
 
291
-
291
+
292
292
  <div class="method_details first">
293
293
  <h3 class="signature first" id="create_upload_jobs-instance_method">
294
-
295
- #<strong>create_upload_jobs</strong>(apikey, filename, filepath, filesize, start_response, options) &#x21d2; <tt>Array</tt>
296
-
297
294
 
298
-
295
+ #<strong>create_upload_jobs</strong>(apikey, filename, filepath, filesize, start_response, options) &#x21d2; <tt>Array</tt>
296
+
297
+
298
+
299
+
299
300
 
300
-
301
301
  </h3><div class="docstring">
302
302
  <div class="discussion">
303
-
303
+
304
304
  <p>Create array of jobs for parallel uploading</p>
305
305
 
306
306
 
@@ -309,117 +309,117 @@
309
309
  <div class="tags">
310
310
  <p class="tag_title">Parameters:</p>
311
311
  <ul class="param">
312
-
312
+
313
313
  <li>
314
-
314
+
315
315
  <span class='name'>apikey</span>
316
-
317
-
316
+
317
+
318
318
  <span class='type'>(<tt>String</tt>)</span>
319
-
320
-
321
-
319
+
320
+
321
+
322
322
  &mdash;
323
323
  <div class='inline'>
324
324
  <p>Filestack API key</p>
325
325
  </div>
326
-
326
+
327
327
  </li>
328
-
328
+
329
329
  <li>
330
-
330
+
331
331
  <span class='name'>filename</span>
332
-
333
-
332
+
333
+
334
334
  <span class='type'>(<tt>String</tt>)</span>
335
-
336
-
337
-
335
+
336
+
337
+
338
338
  &mdash;
339
339
  <div class='inline'>
340
340
  <p>Name of incoming file</p>
341
341
  </div>
342
-
342
+
343
343
  </li>
344
-
344
+
345
345
  <li>
346
-
346
+
347
347
  <span class='name'>filepath</span>
348
-
349
-
348
+
349
+
350
350
  <span class='type'>(<tt>String</tt>)</span>
351
-
352
-
353
-
351
+
352
+
353
+
354
354
  &mdash;
355
355
  <div class='inline'>
356
356
  <p>Local path to file</p>
357
357
  </div>
358
-
358
+
359
359
  </li>
360
-
360
+
361
361
  <li>
362
-
362
+
363
363
  <span class='name'>filesize</span>
364
-
365
-
364
+
365
+
366
366
  <span class='type'>(<tt>Int</tt>)</span>
367
-
368
-
369
-
367
+
368
+
369
+
370
370
  &mdash;
371
371
  <div class='inline'>
372
372
  <p>Size of incoming file</p>
373
373
  </div>
374
-
374
+
375
375
  </li>
376
-
376
+
377
377
  <li>
378
-
378
+
379
379
  <span class='name'>start_response</span>
380
-
381
-
380
+
381
+
382
382
  <span class='type'>(<tt>Typhoeus::Response</tt>)</span>
383
-
384
-
385
-
383
+
384
+
385
+
386
386
  &mdash;
387
387
  <div class='inline'>
388
388
  <p>Response body from multipart_start</p>
389
389
  </div>
390
-
390
+
391
391
  </li>
392
-
392
+
393
393
  <li>
394
-
394
+
395
395
  <span class='name'>options</span>
396
-
397
-
396
+
397
+
398
398
  <span class='type'>(<tt>Hash</tt>)</span>
399
-
400
-
401
-
399
+
400
+
401
+
402
402
  &mdash;
403
403
  <div class='inline'>
404
404
  <p>User-defined options for multipart uploads</p>
405
405
  </div>
406
-
406
+
407
407
  </li>
408
-
408
+
409
409
  </ul>
410
410
 
411
411
  <p class="tag_title">Returns:</p>
412
412
  <ul class="return">
413
-
413
+
414
414
  <li>
415
-
416
-
415
+
416
+
417
417
  <span class='type'>(<tt>Array</tt>)</span>
418
-
419
-
420
-
418
+
419
+
420
+
421
421
  </li>
422
-
422
+
423
423
  </ul>
424
424
 
425
425
  </div><table class="source_code">
@@ -500,16 +500,16 @@
500
500
  </tr>
501
501
  </table>
502
502
  </div>
503
-
503
+
504
504
  <div class="method_details ">
505
505
  <h3 class="signature " id="get_file_info-instance_method">
506
-
507
- #<strong>get_file_info</strong>(file) &#x21d2; <tt>Object</tt>
508
-
509
506
 
510
-
507
+ #<strong>get_file_info</strong>(file) &#x21d2; <tt>Object</tt>
508
+
509
+
510
+
511
+
511
512
 
512
-
513
513
  </h3><table class="source_code">
514
514
  <tr>
515
515
  <td>
@@ -532,7 +532,7 @@
532
532
  <span class='kw'>def</span> <span class='id identifier rubyid_get_file_info'>get_file_info</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
533
533
  <span class='id identifier rubyid_filename'>filename</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
534
534
  <span class='id identifier rubyid_filesize'>filesize</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
535
- <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='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span><span class='rparen'>)</span>
535
+ <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='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_content_type'>content_type</span>
536
536
  <span class='kw'>if</span> <span class='id identifier rubyid_mimetype'>mimetype</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
537
537
  <span class='id identifier rubyid_mimetype'>mimetype</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>application/octet-stream</span><span class='tstring_end'>&#39;</span></span>
538
538
  <span class='kw'>end</span>
@@ -542,19 +542,19 @@
542
542
  </tr>
543
543
  </table>
544
544
  </div>
545
-
545
+
546
546
  <div class="method_details ">
547
547
  <h3 class="signature " id="multipart_complete-instance_method">
548
-
549
- #<strong>multipart_complete</strong>(apikey, filename, filesize, mimetype, start_response, parts_and_etags, options, intelligent = false) &#x21d2; <tt>Typhoeus::Response</tt>
550
-
551
548
 
552
-
549
+ #<strong>multipart_complete</strong>(apikey, filename, filesize, mimetype, start_response, parts_and_etags, options, intelligent = false) &#x21d2; <tt>Typhoeus::Response</tt>
550
+
551
+
552
+
553
+
553
554
 
554
-
555
555
  </h3><div class="docstring">
556
556
  <div class="discussion">
557
-
557
+
558
558
  <p>Send complete call to multipart endpoint</p>
559
559
 
560
560
 
@@ -563,149 +563,149 @@
563
563
  <div class="tags">
564
564
  <p class="tag_title">Parameters:</p>
565
565
  <ul class="param">
566
-
566
+
567
567
  <li>
568
-
568
+
569
569
  <span class='name'>apikey</span>
570
-
571
-
570
+
571
+
572
572
  <span class='type'>(<tt>String</tt>)</span>
573
-
574
-
575
-
573
+
574
+
575
+
576
576
  &mdash;
577
577
  <div class='inline'>
578
578
  <p>Filestack API key</p>
579
579
  </div>
580
-
580
+
581
581
  </li>
582
-
582
+
583
583
  <li>
584
-
584
+
585
585
  <span class='name'>filename</span>
586
-
587
-
586
+
587
+
588
588
  <span class='type'>(<tt>String</tt>)</span>
589
-
590
-
591
-
589
+
590
+
591
+
592
592
  &mdash;
593
593
  <div class='inline'>
594
594
  <p>Name of incoming file</p>
595
595
  </div>
596
-
596
+
597
597
  </li>
598
-
598
+
599
599
  <li>
600
-
600
+
601
601
  <span class='name'>filesize</span>
602
-
603
-
602
+
603
+
604
604
  <span class='type'>(<tt>Int</tt>)</span>
605
-
606
-
607
-
605
+
606
+
607
+
608
608
  &mdash;
609
609
  <div class='inline'>
610
610
  <p>Size of incoming file</p>
611
611
  </div>
612
-
612
+
613
613
  </li>
614
-
614
+
615
615
  <li>
616
-
616
+
617
617
  <span class='name'>mimetype</span>
618
-
619
-
618
+
619
+
620
620
  <span class='type'>(<tt>String</tt>)</span>
621
-
622
-
623
-
621
+
622
+
623
+
624
624
  &mdash;
625
625
  <div class='inline'>
626
626
  <p>Mimetype of incoming file</p>
627
627
  </div>
628
-
628
+
629
629
  </li>
630
-
630
+
631
631
  <li>
632
-
632
+
633
633
  <span class='name'>start_response</span>
634
-
635
-
634
+
635
+
636
636
  <span class='type'>(<tt>Typhoeus::Response</tt>)</span>
637
-
638
-
639
-
637
+
638
+
639
+
640
640
  &mdash;
641
641
  <div class='inline'>
642
642
  <p>Response body from multipart_start</p>
643
643
  </div>
644
-
644
+
645
645
  </li>
646
-
646
+
647
647
  <li>
648
-
648
+
649
649
  <span class='name'>security</span>
650
-
651
-
650
+
651
+
652
652
  <span class='type'>(<tt><span class='object_link'><a href="FilestackSecurity.html" title="FilestackSecurity (class)">FilestackSecurity</a></span></tt>)</span>
653
-
654
-
655
-
653
+
654
+
655
+
656
656
  &mdash;
657
657
  <div class='inline'>
658
658
  <p>Security object with policy/signature</p>
659
659
  </div>
660
-
660
+
661
661
  </li>
662
-
662
+
663
663
  <li>
664
-
664
+
665
665
  <span class='name'>parts_and_etags</span>
666
-
667
-
666
+
667
+
668
668
  <span class='type'>(<tt>Array</tt>)</span>
669
-
670
-
671
-
669
+
670
+
671
+
672
672
  &mdash;
673
673
  <div class='inline'>
674
674
  <p>Array of strings defining etags and their associated part numbers</p>
675
675
  </div>
676
-
676
+
677
677
  </li>
678
-
678
+
679
679
  <li>
680
-
680
+
681
681
  <span class='name'>options</span>
682
-
683
-
682
+
683
+
684
684
  <span class='type'>(<tt>Hash</tt>)</span>
685
-
686
-
687
-
685
+
686
+
687
+
688
688
  &mdash;
689
689
  <div class='inline'>
690
690
  <p>User-defined options for multipart uploads</p>
691
691
  </div>
692
-
692
+
693
693
  </li>
694
-
694
+
695
695
  </ul>
696
696
 
697
697
  <p class="tag_title">Returns:</p>
698
698
  <ul class="return">
699
-
699
+
700
700
  <li>
701
-
702
-
701
+
702
+
703
703
  <span class='type'>(<tt>Typhoeus::Response</tt>)</span>
704
-
705
-
706
-
704
+
705
+
706
+
707
707
  </li>
708
-
708
+
709
709
  </ul>
710
710
 
711
711
  </div><table class="source_code">
@@ -792,19 +792,19 @@
792
792
  </tr>
793
793
  </table>
794
794
  </div>
795
-
795
+
796
796
  <div class="method_details ">
797
797
  <h3 class="signature " id="multipart_start-instance_method">
798
-
799
- #<strong>multipart_start</strong>(apikey, filename, filesize, mimetype, security, options) &#x21d2; <tt>Typhoeus::Response</tt>
800
-
801
798
 
802
-
799
+ #<strong>multipart_start</strong>(apikey, filename, filesize, mimetype, security, options) &#x21d2; <tt>Typhoeus::Response</tt>
800
+
801
+
802
+
803
+
803
804
 
804
-
805
805
  </h3><div class="docstring">
806
806
  <div class="discussion">
807
-
807
+
808
808
  <p>Send start response to multipart endpoint</p>
809
809
 
810
810
 
@@ -813,117 +813,117 @@
813
813
  <div class="tags">
814
814
  <p class="tag_title">Parameters:</p>
815
815
  <ul class="param">
816
-
816
+
817
817
  <li>
818
-
818
+
819
819
  <span class='name'>apikey</span>
820
-
821
-
820
+
821
+
822
822
  <span class='type'>(<tt>String</tt>)</span>
823
-
824
-
825
-
823
+
824
+
825
+
826
826
  &mdash;
827
827
  <div class='inline'>
828
828
  <p>Filestack API key</p>
829
829
  </div>
830
-
830
+
831
831
  </li>
832
-
832
+
833
833
  <li>
834
-
834
+
835
835
  <span class='name'>filename</span>
836
-
837
-
836
+
837
+
838
838
  <span class='type'>(<tt>String</tt>)</span>
839
-
840
-
841
-
839
+
840
+
841
+
842
842
  &mdash;
843
843
  <div class='inline'>
844
844
  <p>Name of incoming file</p>
845
845
  </div>
846
-
846
+
847
847
  </li>
848
-
848
+
849
849
  <li>
850
-
850
+
851
851
  <span class='name'>filesize</span>
852
-
853
-
852
+
853
+
854
854
  <span class='type'>(<tt>Int</tt>)</span>
855
-
856
-
857
-
855
+
856
+
857
+
858
858
  &mdash;
859
859
  <div class='inline'>
860
860
  <p>Size of incoming file</p>
861
861
  </div>
862
-
862
+
863
863
  </li>
864
-
864
+
865
865
  <li>
866
-
866
+
867
867
  <span class='name'>mimetype</span>
868
-
869
-
868
+
869
+
870
870
  <span class='type'>(<tt>String</tt>)</span>
871
-
872
-
873
-
871
+
872
+
873
+
874
874
  &mdash;
875
875
  <div class='inline'>
876
876
  <p>Mimetype of incoming file</p>
877
877
  </div>
878
-
878
+
879
879
  </li>
880
-
880
+
881
881
  <li>
882
-
882
+
883
883
  <span class='name'>security</span>
884
-
885
-
884
+
885
+
886
886
  <span class='type'>(<tt><span class='object_link'><a href="FilestackSecurity.html" title="FilestackSecurity (class)">FilestackSecurity</a></span></tt>)</span>
887
-
888
-
889
-
887
+
888
+
889
+
890
890
  &mdash;
891
891
  <div class='inline'>
892
892
  <p>Security object with policy/signature</p>
893
893
  </div>
894
-
894
+
895
895
  </li>
896
-
896
+
897
897
  <li>
898
-
898
+
899
899
  <span class='name'>options</span>
900
-
901
-
900
+
901
+
902
902
  <span class='type'>(<tt>Hash</tt>)</span>
903
-
904
-
905
-
903
+
904
+
905
+
906
906
  &mdash;
907
907
  <div class='inline'>
908
908
  <p>User-defined options for multipart uploads</p>
909
909
  </div>
910
-
910
+
911
911
  </li>
912
-
912
+
913
913
  </ul>
914
914
 
915
915
  <p class="tag_title">Returns:</p>
916
916
  <ul class="return">
917
-
917
+
918
918
  <li>
919
-
920
-
919
+
920
+
921
921
  <span class='type'>(<tt>Typhoeus::Response</tt>)</span>
922
-
923
-
924
-
922
+
923
+
924
+
925
925
  </li>
926
-
926
+
927
927
  </ul>
928
928
 
929
929
  </div><table class="source_code">
@@ -996,19 +996,19 @@
996
996
  </tr>
997
997
  </table>
998
998
  </div>
999
-
999
+
1000
1000
  <div class="method_details ">
1001
1001
  <h3 class="signature " id="multipart_upload-instance_method">
1002
-
1003
- #<strong>multipart_upload</strong>(apikey, filepath, security, options, timeout, intelligent: false) &#x21d2; <tt>Typhoeus::Response</tt>
1004
-
1005
1002
 
1006
-
1003
+ #<strong>multipart_upload</strong>(apikey, filepath, security, options, timeout, intelligent: false) &#x21d2; <tt>Typhoeus::Response</tt>
1004
+
1005
+
1006
+
1007
+
1007
1008
 
1008
-
1009
1009
  </h3><div class="docstring">
1010
1010
  <div class="discussion">
1011
-
1011
+
1012
1012
  <p>Run entire multipart process through with file and options</p>
1013
1013
 
1014
1014
 
@@ -1017,85 +1017,85 @@
1017
1017
  <div class="tags">
1018
1018
  <p class="tag_title">Parameters:</p>
1019
1019
  <ul class="param">
1020
-
1020
+
1021
1021
  <li>
1022
-
1022
+
1023
1023
  <span class='name'>apikey</span>
1024
-
1025
-
1024
+
1025
+
1026
1026
  <span class='type'>(<tt>String</tt>)</span>
1027
-
1028
-
1029
-
1027
+
1028
+
1029
+
1030
1030
  &mdash;
1031
1031
  <div class='inline'>
1032
1032
  <p>Filestack API key</p>
1033
1033
  </div>
1034
-
1034
+
1035
1035
  </li>
1036
-
1036
+
1037
1037
  <li>
1038
-
1038
+
1039
1039
  <span class='name'>filename</span>
1040
-
1041
-
1040
+
1041
+
1042
1042
  <span class='type'>(<tt>String</tt>)</span>
1043
-
1044
-
1045
-
1043
+
1044
+
1045
+
1046
1046
  &mdash;
1047
1047
  <div class='inline'>
1048
1048
  <p>Name of incoming file</p>
1049
1049
  </div>
1050
-
1050
+
1051
1051
  </li>
1052
-
1052
+
1053
1053
  <li>
1054
-
1054
+
1055
1055
  <span class='name'>security</span>
1056
-
1057
-
1056
+
1057
+
1058
1058
  <span class='type'>(<tt><span class='object_link'><a href="FilestackSecurity.html" title="FilestackSecurity (class)">FilestackSecurity</a></span></tt>)</span>
1059
-
1060
-
1061
-
1059
+
1060
+
1061
+
1062
1062
  &mdash;
1063
1063
  <div class='inline'>
1064
1064
  <p>Security object with policy/signature</p>
1065
1065
  </div>
1066
-
1066
+
1067
1067
  </li>
1068
-
1068
+
1069
1069
  <li>
1070
-
1070
+
1071
1071
  <span class='name'>options</span>
1072
-
1073
-
1072
+
1073
+
1074
1074
  <span class='type'>(<tt>Hash</tt>)</span>
1075
-
1076
-
1077
-
1075
+
1076
+
1077
+
1078
1078
  &mdash;
1079
1079
  <div class='inline'>
1080
1080
  <p>User-defined options for multipart uploads</p>
1081
1081
  </div>
1082
-
1082
+
1083
1083
  </li>
1084
-
1084
+
1085
1085
  </ul>
1086
1086
 
1087
1087
  <p class="tag_title">Returns:</p>
1088
1088
  <ul class="return">
1089
-
1089
+
1090
1090
  <li>
1091
-
1092
-
1091
+
1092
+
1093
1093
  <span class='type'>(<tt>Typhoeus::Response</tt>)</span>
1094
-
1095
-
1096
-
1094
+
1095
+
1096
+
1097
1097
  </li>
1098
-
1098
+
1099
1099
  </ul>
1100
1100
 
1101
1101
  </div><table class="source_code">
@@ -1178,7 +1178,7 @@
1178
1178
  <span class='id identifier rubyid_response_complete'>response_complete</span> <span class='op'>=</span> <span class='id identifier rubyid_multipart_complete'>multipart_complete</span><span class='lparen'>(</span>
1179
1179
  <span class='id identifier rubyid_apikey'>apikey</span><span class='comma'>,</span> <span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_filesize'>filesize</span><span class='comma'>,</span> <span class='id identifier rubyid_mimetype'>mimetype</span><span class='comma'>,</span>
1180
1180
  <span class='id identifier rubyid_start_response'>start_response</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_intelligent'>intelligent</span>
1181
- <span class='rparen'>)</span>
1181
+ <span class='rparen'>)</span>
1182
1182
  <span class='kw'>end</span>
1183
1183
  <span class='rbrace'>}</span>
1184
1184
  <span class='kw'>rescue</span>
@@ -1190,19 +1190,19 @@
1190
1190
  </tr>
1191
1191
  </table>
1192
1192
  </div>
1193
-
1193
+
1194
1194
  <div class="method_details ">
1195
1195
  <h3 class="signature " id="run_uploads-instance_method">
1196
-
1197
- #<strong>run_uploads</strong>(jobs, apikey, filepath, options) &#x21d2; <tt>Array</tt>
1198
-
1199
1196
 
1200
-
1197
+ #<strong>run_uploads</strong>(jobs, apikey, filepath, options) &#x21d2; <tt>Array</tt>
1198
+
1199
+
1200
+
1201
+
1201
1202
 
1202
-
1203
1203
  </h3><div class="docstring">
1204
1204
  <div class="discussion">
1205
-
1205
+
1206
1206
  <p>Runs all jobs in parallel</p>
1207
1207
 
1208
1208
 
@@ -1211,90 +1211,90 @@
1211
1211
  <div class="tags">
1212
1212
  <p class="tag_title">Parameters:</p>
1213
1213
  <ul class="param">
1214
-
1214
+
1215
1215
  <li>
1216
-
1216
+
1217
1217
  <span class='name'>jobs</span>
1218
-
1219
-
1218
+
1219
+
1220
1220
  <span class='type'>(<tt>Array</tt>)</span>
1221
-
1222
-
1223
-
1221
+
1222
+
1223
+
1224
1224
  &mdash;
1225
1225
  <div class='inline'>
1226
1226
  <p>Array of jobs to be run</p>
1227
1227
  </div>
1228
-
1228
+
1229
1229
  </li>
1230
-
1230
+
1231
1231
  <li>
1232
-
1232
+
1233
1233
  <span class='name'>apikey</span>
1234
-
1235
-
1234
+
1235
+
1236
1236
  <span class='type'>(<tt>String</tt>)</span>
1237
-
1238
-
1239
-
1237
+
1238
+
1239
+
1240
1240
  &mdash;
1241
1241
  <div class='inline'>
1242
1242
  <p>Filestack API key</p>
1243
1243
  </div>
1244
-
1244
+
1245
1245
  </li>
1246
-
1246
+
1247
1247
  <li>
1248
-
1248
+
1249
1249
  <span class='name'>filepath</span>
1250
-
1251
-
1250
+
1251
+
1252
1252
  <span class='type'>(<tt>String</tt>)</span>
1253
-
1254
-
1255
-
1253
+
1254
+
1255
+
1256
1256
  &mdash;
1257
1257
  <div class='inline'>
1258
1258
  <p>Local path to file</p>
1259
1259
  </div>
1260
-
1260
+
1261
1261
  </li>
1262
-
1262
+
1263
1263
  <li>
1264
-
1264
+
1265
1265
  <span class='name'>options</span>
1266
-
1267
-
1266
+
1267
+
1268
1268
  <span class='type'>(<tt>Hash</tt>)</span>
1269
-
1270
-
1271
-
1269
+
1270
+
1271
+
1272
1272
  &mdash;
1273
1273
  <div class='inline'>
1274
1274
  <p>User-defined options for multipart uploads</p>
1275
1275
  </div>
1276
-
1276
+
1277
1277
  </li>
1278
-
1278
+
1279
1279
  </ul>
1280
1280
 
1281
1281
  <p class="tag_title">Returns:</p>
1282
1282
  <ul class="return">
1283
-
1283
+
1284
1284
  <li>
1285
-
1286
-
1285
+
1286
+
1287
1287
  <span class='type'>(<tt>Array</tt>)</span>
1288
-
1289
-
1290
-
1288
+
1289
+
1290
+
1291
1291
  &mdash;
1292
1292
  <div class='inline'>
1293
1293
  <p>Array of parts/etags strings</p>
1294
1294
  </div>
1295
-
1295
+
1296
1296
  </li>
1297
-
1297
+
1298
1298
  </ul>
1299
1299
 
1300
1300
  </div><table class="source_code">
@@ -1328,7 +1328,7 @@
1328
1328
  <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_upload_chunk'>upload_chunk</span><span class='lparen'>(</span>
1329
1329
  <span class='id identifier rubyid_job'>job</span><span class='comma'>,</span> <span class='id identifier rubyid_apikey'>apikey</span><span class='comma'>,</span> <span class='id identifier rubyid_filepath'>filepath</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
1330
1330
  <span class='rparen'>)</span>
1331
- <span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span> <span class='op'>==</span> <span class='int'>200</span>
1331
+ <span class='kw'>if</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span> <span class='op'>==</span> <span class='int'>200</span>
1332
1332
  <span class='id identifier rubyid_bar'>bar</span><span class='period'>.</span><span class='id identifier rubyid_increment!'>increment!</span>
1333
1333
  <span class='id identifier rubyid_part'>part</span> <span class='op'>=</span> <span class='id identifier rubyid_job'>job</span><span class='lbracket'>[</span><span class='symbol'>:part</span><span class='rbracket'>]</span>
1334
1334
  <span class='id identifier rubyid_etag'>etag</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='symbol'>:etag</span><span class='rbracket'>]</span>
@@ -1341,19 +1341,19 @@
1341
1341
  </tr>
1342
1342
  </table>
1343
1343
  </div>
1344
-
1344
+
1345
1345
  <div class="method_details ">
1346
1346
  <h3 class="signature " id="upload_chunk-instance_method">
1347
-
1348
- #<strong>upload_chunk</strong>(job, apikey, filepath, options) &#x21d2; <tt>Typhoeus::Response</tt>
1349
-
1350
1347
 
1351
-
1348
+ #<strong>upload_chunk</strong>(job, apikey, filepath, options) &#x21d2; <tt>Typhoeus::Response</tt>
1349
+
1350
+
1351
+
1352
+
1352
1353
 
1353
-
1354
1354
  </h3><div class="docstring">
1355
1355
  <div class="discussion">
1356
-
1356
+
1357
1357
  <p>Uploads one chunk of the file</p>
1358
1358
 
1359
1359
 
@@ -1362,101 +1362,101 @@
1362
1362
  <div class="tags">
1363
1363
  <p class="tag_title">Parameters:</p>
1364
1364
  <ul class="param">
1365
-
1365
+
1366
1366
  <li>
1367
-
1367
+
1368
1368
  <span class='name'>job</span>
1369
-
1370
-
1369
+
1370
+
1371
1371
  <span class='type'>(<tt>Hash</tt>)</span>
1372
-
1373
-
1374
-
1372
+
1373
+
1374
+
1375
1375
  &mdash;
1376
1376
  <div class='inline'>
1377
1377
  <p>Hash of options needed to upload a chunk</p>
1378
1378
  </div>
1379
-
1379
+
1380
1380
  </li>
1381
-
1381
+
1382
1382
  <li>
1383
-
1383
+
1384
1384
  <span class='name'>apikey</span>
1385
-
1386
-
1385
+
1386
+
1387
1387
  <span class='type'>(<tt>String</tt>)</span>
1388
-
1389
-
1390
-
1388
+
1389
+
1390
+
1391
1391
  &mdash;
1392
1392
  <div class='inline'>
1393
1393
  <p>Filestack API key</p>
1394
1394
  </div>
1395
-
1395
+
1396
1396
  </li>
1397
-
1397
+
1398
1398
  <li>
1399
-
1399
+
1400
1400
  <span class='name'>location_url</span>
1401
-
1402
-
1401
+
1402
+
1403
1403
  <span class='type'>(<tt>String</tt>)</span>
1404
-
1405
-
1406
-
1404
+
1405
+
1406
+
1407
1407
  &mdash;
1408
1408
  <div class='inline'>
1409
1409
  <p>Location url given back from endpoint</p>
1410
1410
  </div>
1411
-
1411
+
1412
1412
  </li>
1413
-
1413
+
1414
1414
  <li>
1415
-
1415
+
1416
1416
  <span class='name'>filepath</span>
1417
-
1418
-
1417
+
1418
+
1419
1419
  <span class='type'>(<tt>String</tt>)</span>
1420
-
1421
-
1422
-
1420
+
1421
+
1422
+
1423
1423
  &mdash;
1424
1424
  <div class='inline'>
1425
1425
  <p>Local path to file</p>
1426
1426
  </div>
1427
-
1427
+
1428
1428
  </li>
1429
-
1429
+
1430
1430
  <li>
1431
-
1431
+
1432
1432
  <span class='name'>options</span>
1433
-
1434
-
1433
+
1434
+
1435
1435
  <span class='type'>(<tt>Hash</tt>)</span>
1436
-
1437
-
1438
-
1436
+
1437
+
1438
+
1439
1439
  &mdash;
1440
1440
  <div class='inline'>
1441
1441
  <p>User-defined options for multipart uploads</p>
1442
1442
  </div>
1443
-
1443
+
1444
1444
  </li>
1445
-
1445
+
1446
1446
  </ul>
1447
1447
 
1448
1448
  <p class="tag_title">Returns:</p>
1449
1449
  <ul class="return">
1450
-
1450
+
1451
1451
  <li>
1452
-
1453
-
1452
+
1453
+
1454
1454
  <span class='type'>(<tt>Typhoeus::Response</tt>)</span>
1455
-
1456
-
1457
-
1455
+
1456
+
1457
+
1458
1458
  </li>
1459
-
1459
+
1460
1460
  </ul>
1461
1461
 
1462
1462
  </div><table class="source_code">
@@ -1500,7 +1500,7 @@
1500
1500
  <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='rparen'>)</span>
1501
1501
  <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_seek'>seek</span><span class='lparen'>(</span><span class='id identifier rubyid_job'>job</span><span class='lbracket'>[</span><span class='symbol'>:seek</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1502
1502
  <span class='id identifier rubyid_chunk'>chunk</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><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="FilestackConfig.html" title="FilestackConfig (class)">FilestackConfig</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FilestackConfig.html#DEFAULT_CHUNK_SIZE-constant" title="FilestackConfig::DEFAULT_CHUNK_SIZE (constant)">DEFAULT_CHUNK_SIZE</a></span></span><span class='rparen'>)</span>
1503
-
1503
+
1504
1504
  <span class='id identifier rubyid_md5'>md5</span> <span class='op'>=</span> <span class='const'>Digest</span><span class='op'>::</span><span class='const'>MD5</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1505
1505
  <span class='id identifier rubyid_md5'>md5</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_chunk'>chunk</span>
1506
1506
  <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbrace'>{</span>
@@ -1527,7 +1527,7 @@
1527
1527
  </tr>
1528
1528
  </table>
1529
1529
  </div>
1530
-
1530
+
1531
1531
  </div>
1532
1532
 
1533
1533
  </div>
@@ -1540,4 +1540,4 @@
1540
1540
 
1541
1541
  </div>
1542
1542
  </body>
1543
- </html>
1543
+ </html>