You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/alphalib/types/robots/document-thumbs.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -172,7 +172,7 @@ If you set this to \`false\`, the robot will not emit files as they become avail
172
172
173
173
Also, extracted pages will be resized a lot faster as they are sent off to other machines for the resizing. This is especially useful for large documents with many pages to get up to 20 times faster processing.
174
174
175
-
Turbo mode increases pricing, though, in that the input document's file size is added for every extracted page. There are no performance benefits nor increased charges for single-page documents.
175
+
Turbo Mode increases pricing, though, in that the input document's file size is added for every extracted page. There are no performance benefits nor increased charges for single-page documents.
Copy file name to clipboardExpand all lines: src/alphalib/types/robots/file-serve.ts
+33-5Lines changed: 33 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -42,12 +42,40 @@ While theoretically possible, you could use [🤖/file/serve](/docs/robots/file-
42
42
43
43
Also consider configuring caching headers and cache-control directives to control how content is cached and invalidated on the CDN edge servers, balancing between freshness and efficiency.
44
44
45
-
More information on:
45
+
## Smart CDN Security with Signature Authentication
- [File Preview Feature](/blog/2024/06/file-preview-with-smart-cdn/) blog post.
47
+
You can leverage [Signature Authentication](/docs/api/authentication/#smart-cdn) to avoid abuse of our encoding platform. Below is a quick Node.js example using our Node SDK, but there are [examples for other languages and SDKs](/docs/api/authentication/#example-code) as well.
48
+
49
+
\`\`\`javascript
50
+
// yarn add transloadit
51
+
// or
52
+
// npm install --save transloadit
53
+
54
+
import { Transloadit } from 'transloadit'
55
+
56
+
const transloadit = new Transloadit({
57
+
authKey: 'YOUR_TRANSLOADIT_KEY',
58
+
authSecret: 'YOUR_TRANSLOADIT_SECRET',
59
+
})
60
+
61
+
const url = transloadit.getSignedSmartCDNUrl({
62
+
workspace: 'YOUR_WORKSPACE',
63
+
template: 'YOUR_TEMPLATE',
64
+
input: 'image.png',
65
+
urlParams: { height: 100, width: 100 },
66
+
})
67
+
68
+
console.log(url)
69
+
\`\`\`
70
+
71
+
This will generate a signed Smart CDN URL that includes authentication parameters, preventing unauthorized access to your transformation endpoints.
Copy file name to clipboardExpand all lines: src/alphalib/types/robots/s3-store.ts
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -149,6 +149,12 @@ Set to \`true\` if you use a custom host and run into access denied errors.
149
149
.optional()
150
150
.describe(`
151
151
This parameter provides signed URLs in the result JSON (in the \`signed_url\` and \`signed_ssl_url\` properties). The number that you set this parameter to is the URL expiry time in seconds. If this parameter is not used, no URL signing is done.
152
+
`),
153
+
session_token: z
154
+
.string()
155
+
.optional()
156
+
.describe(`
157
+
The session token to use for the S3 store. This is only used if the credentials are from an IAM user with the \`sts:AssumeRole\` permission.
0 commit comments