groupdocs 1.5.8 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +9 -0
- data/examples/api-samples/public/docs/sample01.html +34 -15
- data/examples/api-samples/public/docs/sample02.html +36 -15
- data/examples/api-samples/public/docs/sample03.html +55 -34
- data/examples/api-samples/public/docs/sample04.html +33 -14
- data/examples/api-samples/public/docs/sample05.html +51 -33
- data/examples/api-samples/public/docs/sample06.html +86 -40
- data/examples/api-samples/public/docs/sample07.html +32 -13
- data/examples/api-samples/public/docs/sample08.html +39 -20
- data/examples/api-samples/public/docs/sample09.html +93 -39
- data/examples/api-samples/public/docs/sample10.html +39 -21
- data/examples/api-samples/public/docs/sample11.html +133 -88
- data/examples/api-samples/public/docs/sample12.html +33 -14
- data/examples/api-samples/public/docs/sample13.html +14 -7
- data/examples/api-samples/public/docs/sample14.html +37 -18
- data/examples/api-samples/public/docs/sample15.html +29 -10
- data/examples/api-samples/public/docs/sample16.html +58 -25
- data/examples/api-samples/public/docs/sample17.html +71 -38
- data/examples/api-samples/public/docs/sample18.html +98 -71
- data/examples/api-samples/public/docs/sample19.html +74 -42
- data/examples/api-samples/public/docs/sample20.html +39 -21
- data/examples/api-samples/public/docs/sample21.html +113 -69
- data/examples/api-samples/public/docs/sample22.html +89 -43
- data/examples/api-samples/public/docs/sample23.html +50 -32
- data/examples/api-samples/public/docs/sample24.html +64 -31
- data/examples/api-samples/public/docs/sample25.html +107 -60
- data/examples/api-samples/public/docs/sample26.html +29 -10
- data/examples/api-samples/public/docs/sample27.html +107 -61
- data/examples/api-samples/public/docs/sample28.html +158 -9
- data/examples/api-samples/public/docs/sample29.html +13 -8
- data/examples/api-samples/public/docs/sample30.html +34 -15
- data/examples/api-samples/public/docs/sample31.html +107 -76
- data/examples/api-samples/public/docs/sample32.html +104 -40
- data/examples/api-samples/public/docs/sample33.html +85 -36
- data/examples/api-samples/public/docs/sample34.html +30 -11
- data/examples/api-samples/public/docs/sample35.html +90 -27
- data/examples/api-samples/public/docs/sample36.html +36 -16
- data/examples/api-samples/public/docs/sample37.html +144 -265
- data/examples/api-samples/public/docs/sample38.html +113 -64
- data/examples/api-samples/public/docs/sample39.html +118 -45
- data/examples/api-samples/public/docs/sample40.html +81 -46
- data/examples/api-samples/public/docs/sample41.html +562 -90
- data/examples/api-samples/public/docs/sample42.html +94 -39
- data/examples/api-samples/public/docs/sample43.html +669 -0
- data/examples/api-samples/samples/sample01.rb +17 -10
- data/examples/api-samples/samples/sample02.rb +21 -12
- data/examples/api-samples/samples/sample03.rb +35 -29
- data/examples/api-samples/samples/sample04.rb +19 -12
- data/examples/api-samples/samples/sample05.rb +24 -17
- data/examples/api-samples/samples/sample06.rb +38 -32
- data/examples/api-samples/samples/sample07.rb +19 -12
- data/examples/api-samples/samples/sample08.rb +22 -15
- data/examples/api-samples/samples/sample09.rb +31 -29
- data/examples/api-samples/samples/sample10.rb +22 -15
- data/examples/api-samples/samples/sample11.rb +78 -81
- data/examples/api-samples/samples/sample12.rb +19 -21
- data/examples/api-samples/samples/sample13.rb +19 -21
- data/examples/api-samples/samples/sample14.rb +18 -12
- data/examples/api-samples/samples/sample15.rb +17 -10
- data/examples/api-samples/samples/sample16.rb +25 -17
- data/examples/api-samples/samples/sample17.rb +31 -23
- data/examples/api-samples/samples/sample18.rb +60 -55
- data/examples/api-samples/samples/sample19.rb +48 -42
- data/examples/api-samples/samples/sample20.rb +20 -13
- data/examples/api-samples/samples/sample21.rb +62 -54
- data/examples/api-samples/samples/sample22.rb +37 -31
- data/examples/api-samples/samples/sample23.rb +24 -17
- data/examples/api-samples/samples/sample24.rb +29 -22
- data/examples/api-samples/samples/sample25.rb +47 -40
- data/examples/api-samples/samples/sample26.rb +16 -9
- data/examples/api-samples/samples/sample27.rb +46 -39
- data/examples/api-samples/samples/sample28.rb +42 -11
- data/examples/api-samples/samples/sample29.rb +13 -8
- data/examples/api-samples/samples/sample30.rb +19 -12
- data/examples/api-samples/samples/sample31.rb +63 -58
- data/examples/api-samples/samples/sample32.rb +45 -42
- data/examples/api-samples/samples/sample33.rb +36 -25
- data/examples/api-samples/samples/sample34.rb +16 -9
- data/examples/api-samples/samples/sample35.rb +66 -53
- data/examples/api-samples/samples/sample36.rb +19 -15
- data/examples/api-samples/samples/sample37.rb +61 -99
- data/examples/api-samples/samples/sample38.rb +51 -43
- data/examples/api-samples/samples/sample39.rb +78 -62
- data/examples/api-samples/samples/sample40.rb +48 -38
- data/examples/api-samples/samples/sample41.rb +189 -67
- data/examples/api-samples/samples/sample42.rb +37 -29
- data/examples/api-samples/samples/sample43.rb +127 -0
- data/examples/api-samples/views/_others_samples.haml +4 -2
- data/examples/api-samples/views/index.haml +4 -2
- data/examples/api-samples/views/sample11.haml +1 -1
- data/examples/api-samples/views/sample28.haml +8 -0
- data/examples/api-samples/views/sample31.haml +1 -6
- data/examples/api-samples/views/sample39.haml +7 -2
- data/examples/api-samples/views/sample41.haml +78 -33
- data/examples/api-samples/views/sample42.haml +0 -1
- data/examples/api-samples/views/sample43.haml +91 -0
- data/lib/groupdocs/api/helpers/access_rights_helper.rb +6 -5
- data/lib/groupdocs/api/helpers/url_helper.rb +2 -1
- data/lib/groupdocs/document.rb +3 -3
- data/lib/groupdocs/version.rb +1 -1
- metadata +5 -2
@@ -68,9 +68,7 @@
|
|
68
68
|
|
69
69
|
</div>
|
70
70
|
|
71
|
-
<div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.email.empty? <span class="keyword">or</span> settings.password.empty
|
72
|
-
|
73
|
-
<span class="keyword">if</span> settings.base_path.empty? <span class="keyword">then</span> settings.base_path = <span class="string">'https://api.groupdocs.com'</span> <span class="keyword">end</span></pre></div></div>
|
71
|
+
<div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.email.empty? <span class="keyword">or</span> settings.password.empty?</pre></div></div>
|
74
72
|
|
75
73
|
</li>
|
76
74
|
|
@@ -81,11 +79,17 @@
|
|
81
79
|
<div class="pilwrap ">
|
82
80
|
<a class="pilcrow" href="#section-4">¶</a>
|
83
81
|
</div>
|
84
|
-
<p>
|
82
|
+
<p>Prepare base path</p>
|
85
83
|
|
86
84
|
</div>
|
87
85
|
|
88
|
-
<div class="content"><div class='highlight'><pre> <span class="
|
86
|
+
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
87
|
+
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
88
|
+
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
89
|
+
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
90
|
+
<span class="keyword">else</span>
|
91
|
+
base_path = settings.base_path
|
92
|
+
<span class="keyword">end</span></pre></div></div>
|
89
93
|
|
90
94
|
</li>
|
91
95
|
|
@@ -96,12 +100,11 @@
|
|
96
100
|
<div class="pilwrap ">
|
97
101
|
<a class="pilcrow" href="#section-5">¶</a>
|
98
102
|
</div>
|
99
|
-
<p>
|
103
|
+
<p>Configure your access to API server</p>
|
100
104
|
|
101
105
|
</div>
|
102
106
|
|
103
|
-
<div class="content"><div class='highlight'><pre>
|
104
|
-
<span class="keyword">end</span></pre></div></div>
|
107
|
+
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|</pre></div></div>
|
105
108
|
|
106
109
|
</li>
|
107
110
|
|
@@ -112,6 +115,22 @@
|
|
112
115
|
<div class="pilwrap ">
|
113
116
|
<a class="pilcrow" href="#section-6">¶</a>
|
114
117
|
</div>
|
118
|
+
<p>Optionally specify API server and version</p>
|
119
|
+
|
120
|
+
</div>
|
121
|
+
|
122
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment">#Default is 'https://api.groupdocs.com'</span>
|
123
|
+
<span class="keyword">end</span></pre></div></div>
|
124
|
+
|
125
|
+
</li>
|
126
|
+
|
127
|
+
|
128
|
+
<li id="section-7">
|
129
|
+
<div class="annotation">
|
130
|
+
|
131
|
+
<div class="pilwrap ">
|
132
|
+
<a class="pilcrow" href="#section-7">¶</a>
|
133
|
+
</div>
|
115
134
|
<p>Make a request to API using email and password</p>
|
116
135
|
|
117
136
|
</div>
|
@@ -125,11 +144,11 @@
|
|
125
144
|
</li>
|
126
145
|
|
127
146
|
|
128
|
-
<li id="section-
|
147
|
+
<li id="section-8">
|
129
148
|
<div class="annotation">
|
130
149
|
|
131
150
|
<div class="pilwrap ">
|
132
|
-
<a class="pilcrow" href="#section-
|
151
|
+
<a class="pilcrow" href="#section-8">¶</a>
|
133
152
|
</div>
|
134
153
|
<p>Set variables for template</p>
|
135
154
|
|
@@ -123,9 +123,7 @@
|
|
123
123
|
|
124
124
|
</div>
|
125
125
|
|
126
|
-
<div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty
|
127
|
-
|
128
|
-
<span class="keyword">if</span> settings.base_path.empty? <span class="keyword">then</span> settings.base_path = <span class="string">'https://api.groupdocs.com'</span> <span class="keyword">end</span></pre></div></div>
|
126
|
+
<div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty?</pre></div></div>
|
129
127
|
|
130
128
|
</li>
|
131
129
|
|
@@ -136,6 +134,27 @@
|
|
136
134
|
<div class="pilwrap ">
|
137
135
|
<a class="pilcrow" href="#section-7">¶</a>
|
138
136
|
</div>
|
137
|
+
<p>Prepare base path</p>
|
138
|
+
|
139
|
+
</div>
|
140
|
+
|
141
|
+
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
142
|
+
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
143
|
+
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
144
|
+
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
145
|
+
<span class="keyword">else</span>
|
146
|
+
base_path = settings.base_path
|
147
|
+
<span class="keyword">end</span></pre></div></div>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
<li id="section-8">
|
153
|
+
<div class="annotation">
|
154
|
+
|
155
|
+
<div class="pilwrap ">
|
156
|
+
<a class="pilcrow" href="#section-8">¶</a>
|
157
|
+
</div>
|
139
158
|
<p>Configure your access to API server</p>
|
140
159
|
|
141
160
|
</div>
|
@@ -147,27 +166,27 @@
|
|
147
166
|
</li>
|
148
167
|
|
149
168
|
|
150
|
-
<li id="section-
|
169
|
+
<li id="section-9">
|
151
170
|
<div class="annotation">
|
152
171
|
|
153
172
|
<div class="pilwrap ">
|
154
|
-
<a class="pilcrow" href="#section-
|
173
|
+
<a class="pilcrow" href="#section-9">¶</a>
|
155
174
|
</div>
|
156
175
|
<p>Optionally specify API server and version</p>
|
157
176
|
|
158
177
|
</div>
|
159
178
|
|
160
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server =
|
179
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
161
180
|
<span class="keyword">end</span></pre></div></div>
|
162
181
|
|
163
182
|
</li>
|
164
183
|
|
165
184
|
|
166
|
-
<li id="section-
|
185
|
+
<li id="section-10">
|
167
186
|
<div class="annotation">
|
168
187
|
|
169
188
|
<div class="pilwrap ">
|
170
|
-
<a class="pilcrow" href="#section-
|
189
|
+
<a class="pilcrow" href="#section-10">¶</a>
|
171
190
|
</div>
|
172
191
|
<p>Get document by file GUID</p>
|
173
192
|
|
@@ -179,11 +198,11 @@
|
|
179
198
|
</li>
|
180
199
|
|
181
200
|
|
182
|
-
<li id="section-
|
201
|
+
<li id="section-11">
|
183
202
|
<div class="annotation">
|
184
203
|
|
185
204
|
<div class="pilwrap ">
|
186
|
-
<a class="pilcrow" href="#section-
|
205
|
+
<a class="pilcrow" href="#section-11">¶</a>
|
187
206
|
</div>
|
188
207
|
<p>Create instance of File</p>
|
189
208
|
|
@@ -195,11 +214,11 @@
|
|
195
214
|
</li>
|
196
215
|
|
197
216
|
|
198
|
-
<li id="section-
|
217
|
+
<li id="section-12">
|
199
218
|
<div class="annotation">
|
200
219
|
|
201
220
|
<div class="pilwrap ">
|
202
|
-
<a class="pilcrow" href="#section-
|
221
|
+
<a class="pilcrow" href="#section-12">¶</a>
|
203
222
|
</div>
|
204
223
|
<p>Construct path</p>
|
205
224
|
|
@@ -210,11 +229,11 @@
|
|
210
229
|
</li>
|
211
230
|
|
212
231
|
|
213
|
-
<li id="section-
|
232
|
+
<li id="section-13">
|
214
233
|
<div class="annotation">
|
215
234
|
|
216
235
|
<div class="pilwrap ">
|
217
|
-
<a class="pilcrow" href="#section-
|
236
|
+
<a class="pilcrow" href="#section-13">¶</a>
|
218
237
|
</div>
|
219
238
|
<p>Open file</p>
|
220
239
|
|
@@ -225,11 +244,11 @@
|
|
225
244
|
</li>
|
226
245
|
|
227
246
|
|
228
|
-
<li id="section-
|
247
|
+
<li id="section-14">
|
229
248
|
<div class="annotation">
|
230
249
|
|
231
250
|
<div class="pilwrap ">
|
232
|
-
<a class="pilcrow" href="#section-
|
251
|
+
<a class="pilcrow" href="#section-14">¶</a>
|
233
252
|
</div>
|
234
253
|
<p>Make a request to API using client_id and private_key</p>
|
235
254
|
|
@@ -241,11 +260,11 @@
|
|
241
260
|
</li>
|
242
261
|
|
243
262
|
|
244
|
-
<li id="section-
|
263
|
+
<li id="section-15">
|
245
264
|
<div class="annotation">
|
246
265
|
|
247
266
|
<div class="pilwrap ">
|
248
|
-
<a class="pilcrow" href="#section-
|
267
|
+
<a class="pilcrow" href="#section-15">¶</a>
|
249
268
|
</div>
|
250
269
|
<p>Upload file from defined url</p>
|
251
270
|
|
@@ -259,11 +278,11 @@
|
|
259
278
|
</li>
|
260
279
|
|
261
280
|
|
262
|
-
<li id="section-
|
281
|
+
<li id="section-16">
|
263
282
|
<div class="annotation">
|
264
283
|
|
265
284
|
<div class="pilwrap ">
|
266
|
-
<a class="pilcrow" href="#section-
|
285
|
+
<a class="pilcrow" href="#section-16">¶</a>
|
267
286
|
</div>
|
268
287
|
<p>Raise exception if something went wrong</p>
|
269
288
|
|
@@ -274,11 +293,11 @@
|
|
274
293
|
</li>
|
275
294
|
|
276
295
|
|
277
|
-
<li id="section-
|
296
|
+
<li id="section-17">
|
278
297
|
<div class="annotation">
|
279
298
|
|
280
299
|
<div class="pilwrap ">
|
281
|
-
<a class="pilcrow" href="#section-
|
300
|
+
<a class="pilcrow" href="#section-17">¶</a>
|
282
301
|
</div>
|
283
302
|
<p>Make GroupDocs::Storage::Document instance</p>
|
284
303
|
|
@@ -289,11 +308,11 @@
|
|
289
308
|
</li>
|
290
309
|
|
291
310
|
|
292
|
-
<li id="section-
|
311
|
+
<li id="section-18">
|
293
312
|
<div class="annotation">
|
294
313
|
|
295
314
|
<div class="pilwrap ">
|
296
|
-
<a class="pilcrow" href="#section-
|
315
|
+
<a class="pilcrow" href="#section-18">¶</a>
|
297
316
|
</div>
|
298
317
|
<p>Create datasource with fields</p>
|
299
318
|
|
@@ -304,11 +323,11 @@
|
|
304
323
|
</li>
|
305
324
|
|
306
325
|
|
307
|
-
<li id="section-
|
326
|
+
<li id="section-19">
|
308
327
|
<div class="annotation">
|
309
328
|
|
310
329
|
<div class="pilwrap ">
|
311
|
-
<a class="pilcrow" href="#section-
|
330
|
+
<a class="pilcrow" href="#section-19">¶</a>
|
312
331
|
</div>
|
313
332
|
<p>Get arry of document's fields</p>
|
314
333
|
|
@@ -319,11 +338,11 @@
|
|
319
338
|
</li>
|
320
339
|
|
321
340
|
|
322
|
-
<li id="section-
|
341
|
+
<li id="section-20">
|
323
342
|
<div class="annotation">
|
324
343
|
|
325
344
|
<div class="pilwrap ">
|
326
|
-
<a class="pilcrow" href="#section-
|
345
|
+
<a class="pilcrow" href="#section-20">¶</a>
|
327
346
|
</div>
|
328
347
|
<p>Create Field instance and fill the fields</p>
|
329
348
|
|
@@ -334,11 +353,11 @@
|
|
334
353
|
</li>
|
335
354
|
|
336
355
|
|
337
|
-
<li id="section-
|
356
|
+
<li id="section-21">
|
338
357
|
<div class="annotation">
|
339
358
|
|
340
359
|
<div class="pilwrap ">
|
341
|
-
<a class="pilcrow" href="#section-
|
360
|
+
<a class="pilcrow" href="#section-21">¶</a>
|
342
361
|
</div>
|
343
362
|
<p>Adds datasource.</p>
|
344
363
|
|
@@ -349,27 +368,27 @@
|
|
349
368
|
</li>
|
350
369
|
|
351
370
|
|
352
|
-
<li id="section-
|
371
|
+
<li id="section-22">
|
353
372
|
<div class="annotation">
|
354
373
|
|
355
374
|
<div class="pilwrap ">
|
356
|
-
<a class="pilcrow" href="#section-
|
375
|
+
<a class="pilcrow" href="#section-22">¶</a>
|
357
376
|
</div>
|
358
377
|
<p>Creates new job to merge datasource into document.</p>
|
359
378
|
|
360
379
|
</div>
|
361
380
|
|
362
381
|
<div class="content"><div class='highlight'><pre> job = document.datasource!(datasource, {<span class="symbol">:new_type</span> => settings.type})
|
363
|
-
sleep <span class="number">10</span> <span class="comment">#
|
382
|
+
sleep <span class="number">10</span> <span class="comment">#Wait for merge and convert</span></pre></div></div>
|
364
383
|
|
365
384
|
</li>
|
366
385
|
|
367
386
|
|
368
|
-
<li id="section-
|
387
|
+
<li id="section-23">
|
369
388
|
<div class="annotation">
|
370
389
|
|
371
390
|
<div class="pilwrap ">
|
372
|
-
<a class="pilcrow" href="#section-
|
391
|
+
<a class="pilcrow" href="#section-23">¶</a>
|
373
392
|
</div>
|
374
393
|
<p>Returns an hash of input and output documents associated to job.</p>
|
375
394
|
|
@@ -380,11 +399,11 @@
|
|
380
399
|
</li>
|
381
400
|
|
382
401
|
|
383
|
-
<li id="section-
|
402
|
+
<li id="section-24">
|
384
403
|
<div class="annotation">
|
385
404
|
|
386
405
|
<div class="pilwrap ">
|
387
|
-
<a class="pilcrow" href="#section-
|
406
|
+
<a class="pilcrow" href="#section-24">¶</a>
|
388
407
|
</div>
|
389
408
|
<p>Download file</p>
|
390
409
|
|
@@ -395,11 +414,11 @@
|
|
395
414
|
</li>
|
396
415
|
|
397
416
|
|
398
|
-
<li id="section-
|
417
|
+
<li id="section-25">
|
399
418
|
<div class="annotation">
|
400
419
|
|
401
420
|
<div class="pilwrap ">
|
402
|
-
<a class="pilcrow" href="#section-
|
421
|
+
<a class="pilcrow" href="#section-25">¶</a>
|
403
422
|
</div>
|
404
423
|
<p>Set converted document GUID</p>
|
405
424
|
|
@@ -410,11 +429,11 @@
|
|
410
429
|
</li>
|
411
430
|
|
412
431
|
|
413
|
-
<li id="section-
|
432
|
+
<li id="section-26">
|
414
433
|
<div class="annotation">
|
415
434
|
|
416
435
|
<div class="pilwrap ">
|
417
|
-
<a class="pilcrow" href="#section-
|
436
|
+
<a class="pilcrow" href="#section-26">¶</a>
|
418
437
|
</div>
|
419
438
|
<p>Set converted document Name</p>
|
420
439
|
|
@@ -425,57 +444,84 @@
|
|
425
444
|
</li>
|
426
445
|
|
427
446
|
|
428
|
-
<li id="section-
|
447
|
+
<li id="section-27">
|
429
448
|
<div class="annotation">
|
430
449
|
|
431
450
|
<div class="pilwrap ">
|
432
|
-
<a class="pilcrow" href="#section-
|
451
|
+
<a class="pilcrow" href="#section-27">¶</a>
|
433
452
|
</div>
|
434
|
-
<p>
|
453
|
+
<p>Prepare to sign url</p>
|
435
454
|
|
436
455
|
</div>
|
437
456
|
|
438
|
-
<div class="content"><div class='highlight'><pre> <span class="
|
439
|
-
|
457
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"/document-viewer/embed/<span class="subst">#{guid}</span>"</span></pre></div></div>
|
458
|
+
|
459
|
+
</li>
|
460
|
+
|
461
|
+
|
462
|
+
<li id="section-28">
|
463
|
+
<div class="annotation">
|
464
|
+
|
465
|
+
<div class="pilwrap ">
|
466
|
+
<a class="pilcrow" href="#section-28">¶</a>
|
467
|
+
</div>
|
468
|
+
<p>Construct result string</p>
|
469
|
+
|
470
|
+
</div>
|
471
|
+
|
472
|
+
<div class="content"><div class='highlight'><pre> url = <span class="constant">GroupDocs::Api::Request</span>.new(<span class="symbol">:path</span> => iframe).prepare_and_sign_url</pre></div></div>
|
473
|
+
|
474
|
+
</li>
|
475
|
+
|
476
|
+
|
477
|
+
<li id="section-29">
|
478
|
+
<div class="annotation">
|
479
|
+
|
480
|
+
<div class="pilwrap ">
|
481
|
+
<a class="pilcrow" href="#section-29">¶</a>
|
482
|
+
</div>
|
483
|
+
<p>Generate iframe URL</p>
|
484
|
+
|
485
|
+
</div>
|
486
|
+
|
487
|
+
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
|
440
488
|
<span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
|
441
|
-
|
489
|
+
iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
|
442
490
|
<span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
|
443
|
-
|
491
|
+
iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
444
492
|
<span class="keyword">else</span>
|
445
|
-
|
493
|
+
iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
446
494
|
<span class="keyword">end</span></pre></div></div>
|
447
495
|
|
448
496
|
</li>
|
449
497
|
|
450
498
|
|
451
|
-
<li id="section-
|
499
|
+
<li id="section-30">
|
452
500
|
<div class="annotation">
|
453
501
|
|
454
502
|
<div class="pilwrap ">
|
455
|
-
<a class="pilcrow" href="#section-
|
503
|
+
<a class="pilcrow" href="#section-30">¶</a>
|
456
504
|
</div>
|
457
|
-
<p>
|
505
|
+
<p>Set iframe with document GUID or raise an error</p>
|
458
506
|
|
459
507
|
</div>
|
460
508
|
|
461
|
-
<div class="content"><div class='highlight'><pre>
|
462
|
-
iframe = <span class="constant">GroupDocs::Api::Request</span>.new(<span class="symbol">:path</span> => url).prepare_and_sign_url</pre></div></div>
|
509
|
+
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> guid</pre></div></div>
|
463
510
|
|
464
511
|
</li>
|
465
512
|
|
466
513
|
|
467
|
-
<li id="section-
|
514
|
+
<li id="section-31">
|
468
515
|
<div class="annotation">
|
469
516
|
|
470
517
|
<div class="pilwrap ">
|
471
|
-
<a class="pilcrow" href="#section-
|
518
|
+
<a class="pilcrow" href="#section-31">¶</a>
|
472
519
|
</div>
|
473
|
-
<p>
|
520
|
+
<p>Make iframe</p>
|
474
521
|
|
475
522
|
</div>
|
476
523
|
|
477
|
-
<div class="content"><div class='highlight'><pre>
|
478
|
-
iframe = <span class="string">"<iframe width='100%' height='600' frameborder='0' src='<span class="subst">#{iframe}</span>'></iframe>"</span>
|
524
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"<iframe id='downloadframe' src='<span class="subst">#{iframe}</span>' width='800' height='1000'></iframe>"</span>
|
479
525
|
<span class="keyword">else</span>
|
480
526
|
raise <span class="string">'File was not converted'</span>
|
481
527
|
<span class="keyword">end</span>
|
@@ -487,11 +533,11 @@
|
|
487
533
|
</li>
|
488
534
|
|
489
535
|
|
490
|
-
<li id="section-
|
536
|
+
<li id="section-32">
|
491
537
|
<div class="annotation">
|
492
538
|
|
493
539
|
<div class="pilwrap ">
|
494
|
-
<a class="pilcrow" href="#section-
|
540
|
+
<a class="pilcrow" href="#section-32">¶</a>
|
495
541
|
</div>
|
496
542
|
<p>Set variables for template</p>
|
497
543
|
|