@lowdefy/docs-content 0.0.0-experimental-20260710073520

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +20 -0
  3. package/content/actions/callapi.md +66 -0
  4. package/content/actions/callmethod.md +41 -0
  5. package/content/actions/copytoclipboard.md +32 -0
  6. package/content/actions/displaymessage.md +53 -0
  7. package/content/actions/downloadcsv.md +89 -0
  8. package/content/actions/fetch.md +50 -0
  9. package/content/actions/geolocationcurrentposition.md +56 -0
  10. package/content/actions/link.md +104 -0
  11. package/content/actions/login.md +85 -0
  12. package/content/actions/logout.md +56 -0
  13. package/content/actions/pdfmake.md +304 -0
  14. package/content/actions/request.md +67 -0
  15. package/content/actions/reset.md +27 -0
  16. package/content/actions/resetvalidation.md +85 -0
  17. package/content/actions/scrollto.md +85 -0
  18. package/content/actions/setdarkmode.md +62 -0
  19. package/content/actions/setfocus.md +33 -0
  20. package/content/actions/setglobal.md +63 -0
  21. package/content/actions/setlocale.md +69 -0
  22. package/content/actions/setstate.md +70 -0
  23. package/content/actions/throw.md +72 -0
  24. package/content/actions/validate.md +87 -0
  25. package/content/actions/wait.md +24 -0
  26. package/content/agents/agent-endpoint-tools.md +190 -0
  27. package/content/agents/agent-mcp-tools.md +124 -0
  28. package/content/agents/agent-multi-agent.md +136 -0
  29. package/content/agents/agent-properties.md +174 -0
  30. package/content/agents/agent-server-hooks.md +336 -0
  31. package/content/agents/agentchat.md +515 -0
  32. package/content/agents/agentconversations.md +148 -0
  33. package/content/concepts/ai-agent-docs.md +190 -0
  34. package/content/concepts/cli.md +213 -0
  35. package/content/concepts/connections-and-requests.md +7 -0
  36. package/content/concepts/custom-html.md +3 -0
  37. package/content/concepts/custom-styling.md +161 -0
  38. package/content/concepts/events-and-actions.md +271 -0
  39. package/content/concepts/hosting-files.md +18 -0
  40. package/content/concepts/i18n.md +320 -0
  41. package/content/concepts/keyboard-shortcuts.md +218 -0
  42. package/content/concepts/layout-overview.md +478 -0
  43. package/content/concepts/lists.md +144 -0
  44. package/content/concepts/logger.md +43 -0
  45. package/content/concepts/lowdefy-schema.md +365 -0
  46. package/content/concepts/menus.md +144 -0
  47. package/content/concepts/module-authoring.md +564 -0
  48. package/content/concepts/modules.md +338 -0
  49. package/content/concepts/operators.md +45 -0
  50. package/content/concepts/overview.md +19 -0
  51. package/content/concepts/references-and-templates.md +207 -0
  52. package/content/concepts/secrets.md +24 -0
  53. package/content/concepts/selectors.md +143 -0
  54. package/content/connections/amazonredshift.md +176 -0
  55. package/content/connections/anthropic.md +232 -0
  56. package/content/connections/awss3.md +313 -0
  57. package/content/connections/azureblobstorage.md +133 -0
  58. package/content/connections/elasticsearch.md +371 -0
  59. package/content/connections/google.md +228 -0
  60. package/content/connections/googlecloudstorage.md +139 -0
  61. package/content/connections/googlesheet.md +313 -0
  62. package/content/connections/knex.md +206 -0
  63. package/content/connections/mariadb.md +177 -0
  64. package/content/connections/mcp.md +134 -0
  65. package/content/connections/mongodb.md +739 -0
  66. package/content/connections/mssql.md +191 -0
  67. package/content/connections/mysql.md +192 -0
  68. package/content/connections/openai-connection.md +228 -0
  69. package/content/connections/postgresql.md +200 -0
  70. package/content/connections/redis.md +116 -0
  71. package/content/connections/sendgridmail.md +94 -0
  72. package/content/connections/smtp.md +149 -0
  73. package/content/connections/sqlite.md +187 -0
  74. package/content/connections/stripe.md +115 -0
  75. package/content/container-blocks/affix.md +413 -0
  76. package/content/container-blocks/alert.md +937 -0
  77. package/content/container-blocks/badge.md +1222 -0
  78. package/content/container-blocks/box.md +1453 -0
  79. package/content/container-blocks/card.md +1200 -0
  80. package/content/container-blocks/carousel.md +2247 -0
  81. package/content/container-blocks/collapse.md +1335 -0
  82. package/content/container-blocks/configprovider.md +1070 -0
  83. package/content/container-blocks/confirmmodal.md +1159 -0
  84. package/content/container-blocks/content.md +597 -0
  85. package/content/container-blocks/descriptions.md +870 -0
  86. package/content/container-blocks/drawer.md +1379 -0
  87. package/content/container-blocks/dropdownmenu.md +643 -0
  88. package/content/container-blocks/flex.md +1510 -0
  89. package/content/container-blocks/footer.md +380 -0
  90. package/content/container-blocks/googlemaps.md +546 -0
  91. package/content/container-blocks/googlemapsheatmap.md +607 -0
  92. package/content/container-blocks/googlemapsscript.md +61 -0
  93. package/content/container-blocks/header.md +302 -0
  94. package/content/container-blocks/label.md +739 -0
  95. package/content/container-blocks/layout.md +604 -0
  96. package/content/container-blocks/masonry.md +1090 -0
  97. package/content/container-blocks/mobilemenu.md +1244 -0
  98. package/content/container-blocks/modal.md +1180 -0
  99. package/content/container-blocks/pageheadermenu.md +614 -0
  100. package/content/container-blocks/pagesidebarlayout.md +438 -0
  101. package/content/container-blocks/pagesidermenu.md +651 -0
  102. package/content/container-blocks/popover.md +1421 -0
  103. package/content/container-blocks/result.md +972 -0
  104. package/content/container-blocks/sider.md +1064 -0
  105. package/content/container-blocks/span.md +747 -0
  106. package/content/container-blocks/spinner.md +267 -0
  107. package/content/container-blocks/splitter.md +1735 -0
  108. package/content/container-blocks/tabs.md +1718 -0
  109. package/content/container-blocks/tooltip.md +1274 -0
  110. package/content/container-blocks/watermark.md +515 -0
  111. package/content/controls/for.md +103 -0
  112. package/content/controls/if.md +107 -0
  113. package/content/controls/log.md +50 -0
  114. package/content/controls/parallel.md +71 -0
  115. package/content/controls/parallel_for.md +36 -0
  116. package/content/controls/reject.md +56 -0
  117. package/content/controls/return.md +66 -0
  118. package/content/controls/set_state.md +98 -0
  119. package/content/controls/switch.md +90 -0
  120. package/content/controls/throw.md +79 -0
  121. package/content/controls/try.md +88 -0
  122. package/content/deployment/docker.md +149 -0
  123. package/content/deployment/node-server.md +27 -0
  124. package/content/deployment/vercel.md +101 -0
  125. package/content/display-blocks/aggrid.md +1459 -0
  126. package/content/display-blocks/anchor.md +336 -0
  127. package/content/display-blocks/avatar.md +1154 -0
  128. package/content/display-blocks/breadcrumb.md +517 -0
  129. package/content/display-blocks/button.md +758 -0
  130. package/content/display-blocks/calendar.md +156 -0
  131. package/content/display-blocks/dangeroushtml.md +314 -0
  132. package/content/display-blocks/dangerousmarkdown.md +423 -0
  133. package/content/display-blocks/diffgit.md +44 -0
  134. package/content/display-blocks/difflist.md +225 -0
  135. package/content/display-blocks/diffsidebyside.md +56 -0
  136. package/content/display-blocks/difftimeline.md +94 -0
  137. package/content/display-blocks/divider.md +406 -0
  138. package/content/display-blocks/download.md +60 -0
  139. package/content/display-blocks/dropdownbutton.md +661 -0
  140. package/content/display-blocks/echart.md +418 -0
  141. package/content/display-blocks/floatbutton.md +545 -0
  142. package/content/display-blocks/html.md +311 -0
  143. package/content/display-blocks/icon.md +717 -0
  144. package/content/display-blocks/img.md +479 -0
  145. package/content/display-blocks/markdown.md +520 -0
  146. package/content/display-blocks/markdownwithcode.md +730 -0
  147. package/content/display-blocks/menu.md +1123 -0
  148. package/content/display-blocks/message.md +941 -0
  149. package/content/display-blocks/notification.md +1410 -0
  150. package/content/display-blocks/paragraph.md +643 -0
  151. package/content/display-blocks/progress.md +818 -0
  152. package/content/display-blocks/qrcode.md +519 -0
  153. package/content/display-blocks/s3download.md +240 -0
  154. package/content/display-blocks/search.md +360 -0
  155. package/content/display-blocks/skeleton.md +272 -0
  156. package/content/display-blocks/skeletonavatar.md +222 -0
  157. package/content/display-blocks/skeletonbutton.md +245 -0
  158. package/content/display-blocks/skeletoninput.md +223 -0
  159. package/content/display-blocks/skeletonparagraph.md +201 -0
  160. package/content/display-blocks/statistic.md +485 -0
  161. package/content/display-blocks/steps.md +585 -0
  162. package/content/display-blocks/tag.md +620 -0
  163. package/content/display-blocks/title.md +654 -0
  164. package/content/display-blocks/tour.md +2359 -0
  165. package/content/input-blocks/autocomplete.md +786 -0
  166. package/content/input-blocks/buttonselector.md +964 -0
  167. package/content/input-blocks/checkboxselector.md +765 -0
  168. package/content/input-blocks/checkboxswitch.md +497 -0
  169. package/content/input-blocks/colorselector.md +884 -0
  170. package/content/input-blocks/daterangeselector.md +777 -0
  171. package/content/input-blocks/dateselector.md +693 -0
  172. package/content/input-blocks/datetimeselector.md +791 -0
  173. package/content/input-blocks/inputgallery.md +528 -0
  174. package/content/input-blocks/monthselector.md +717 -0
  175. package/content/input-blocks/multipleselector.md +1337 -0
  176. package/content/input-blocks/numberinput.md +855 -0
  177. package/content/input-blocks/pagination.md +679 -0
  178. package/content/input-blocks/paragraphinput.md +1664 -0
  179. package/content/input-blocks/passwordinput.md +480 -0
  180. package/content/input-blocks/phonenumberinput.md +688 -0
  181. package/content/input-blocks/radioselector.md +820 -0
  182. package/content/input-blocks/ratingslider.md +684 -0
  183. package/content/input-blocks/s3uploadbutton.md +384 -0
  184. package/content/input-blocks/s3uploaddragger.md +305 -0
  185. package/content/input-blocks/s3uploadphoto.md +288 -0
  186. package/content/input-blocks/segmentedselector.md +782 -0
  187. package/content/input-blocks/selector.md +1162 -0
  188. package/content/input-blocks/switch.md +552 -0
  189. package/content/input-blocks/textarea.md +714 -0
  190. package/content/input-blocks/textinput.md +639 -0
  191. package/content/input-blocks/tiptapinput.md +226 -0
  192. package/content/input-blocks/tiptapmentioninput.md +471 -0
  193. package/content/input-blocks/titleinput.md +1094 -0
  194. package/content/input-blocks/treeinput.md +144 -0
  195. package/content/input-blocks/treemultipleselector.md +162 -0
  196. package/content/input-blocks/treeselector.md +185 -0
  197. package/content/input-blocks/upload.md +149 -0
  198. package/content/input-blocks/uploaddragger.md +85 -0
  199. package/content/input-blocks/uploadphoto.md +84 -0
  200. package/content/input-blocks/weekselector.md +630 -0
  201. package/content/list-blocks/controlledlist.md +498 -0
  202. package/content/list-blocks/list.md +529 -0
  203. package/content/list-blocks/listselector.md +301 -0
  204. package/content/list-blocks/masonrylist.md +230 -0
  205. package/content/migration/upgrade-guide.md +106 -0
  206. package/content/migration/v4-to-v5.md +589 -0
  207. package/content/migration/v5-to-v6.md +36 -0
  208. package/content/operators/_actions.md +58 -0
  209. package/content/operators/_and.md +76 -0
  210. package/content/operators/_api.md +254 -0
  211. package/content/operators/_app.md +114 -0
  212. package/content/operators/_args.md +65 -0
  213. package/content/operators/_array.md +331 -0
  214. package/content/operators/_base64.md +49 -0
  215. package/content/operators/_boolean.md +33 -0
  216. package/content/operators/_build.md +166 -0
  217. package/content/operators/_change_case.md +357 -0
  218. package/content/operators/_date.md +415 -0
  219. package/content/operators/_dayjs.md +128 -0
  220. package/content/operators/_diff.md +61 -0
  221. package/content/operators/_divide.md +32 -0
  222. package/content/operators/_eq.md +52 -0
  223. package/content/operators/_event.md +86 -0
  224. package/content/operators/_function.md +52 -0
  225. package/content/operators/_get.md +92 -0
  226. package/content/operators/_global.md +86 -0
  227. package/content/operators/_gt.md +50 -0
  228. package/content/operators/_gte.md +50 -0
  229. package/content/operators/_hash.md +112 -0
  230. package/content/operators/_if.md +30 -0
  231. package/content/operators/_if_none.md +47 -0
  232. package/content/operators/_index.md +48 -0
  233. package/content/operators/_input.md +86 -0
  234. package/content/operators/_intl.md +135 -0
  235. package/content/operators/_item.md +166 -0
  236. package/content/operators/_js.md +113 -0
  237. package/content/operators/_json.md +120 -0
  238. package/content/operators/_jsonata.md +152 -0
  239. package/content/operators/_locale.md +65 -0
  240. package/content/operators/_location.md +40 -0
  241. package/content/operators/_log.md +22 -0
  242. package/content/operators/_lt.md +50 -0
  243. package/content/operators/_lte.md +50 -0
  244. package/content/operators/_math.md +407 -0
  245. package/content/operators/_media.md +83 -0
  246. package/content/operators/_menu.md +62 -0
  247. package/content/operators/_module.md +340 -0
  248. package/content/operators/_mql.md +95 -0
  249. package/content/operators/_ne.md +62 -0
  250. package/content/operators/_not.md +33 -0
  251. package/content/operators/_number.md +159 -0
  252. package/content/operators/_nunjucks.md +117 -0
  253. package/content/operators/_object.md +253 -0
  254. package/content/operators/_operator.md +33 -0
  255. package/content/operators/_or.md +67 -0
  256. package/content/operators/_product.md +45 -0
  257. package/content/operators/_random.md +90 -0
  258. package/content/operators/_ref.md +80 -0
  259. package/content/operators/_regex.md +69 -0
  260. package/content/operators/_request.md +35 -0
  261. package/content/operators/_request_details.md +29 -0
  262. package/content/operators/_secret.md +56 -0
  263. package/content/operators/_state.md +134 -0
  264. package/content/operators/_step.md +98 -0
  265. package/content/operators/_string.md +327 -0
  266. package/content/operators/_subtract.md +24 -0
  267. package/content/operators/_sum.md +45 -0
  268. package/content/operators/_switch.md +37 -0
  269. package/content/operators/_t.md +96 -0
  270. package/content/operators/_theme.md +65 -0
  271. package/content/operators/_type.md +78 -0
  272. package/content/operators/_uri.md +49 -0
  273. package/content/operators/_url_query.md +92 -0
  274. package/content/operators/_user.md +154 -0
  275. package/content/operators/_uuid.md +118 -0
  276. package/content/operators/_var.md +88 -0
  277. package/content/operators/_yaml.md +96 -0
  278. package/content/other/introduction.md +39 -0
  279. package/content/other/next-auth-providers.md +3 -0
  280. package/content/other/updatesession.md +26 -0
  281. package/content/plugins/plugins-actions.md +80 -0
  282. package/content/plugins/plugins-connections.md +98 -0
  283. package/content/plugins/plugins-dev.md +138 -0
  284. package/content/plugins/plugins-introduction.md +29 -0
  285. package/content/plugins/plugins-operators.md +71 -0
  286. package/content/testing/e2e-auth.md +108 -0
  287. package/content/testing/e2e-configuration.md +107 -0
  288. package/content/testing/e2e-getting-started.md +96 -0
  289. package/content/testing/e2e-introduction.md +53 -0
  290. package/content/testing/e2e-mocking.md +155 -0
  291. package/content/testing/e2e-writing-tests.md +214 -0
  292. package/content/tutorial/tutorial-actions-operators.md +222 -0
  293. package/content/tutorial/tutorial-add-blocks.md +86 -0
  294. package/content/tutorial/tutorial-create-page.md +57 -0
  295. package/content/tutorial/tutorial-display-data-page.md +181 -0
  296. package/content/tutorial/tutorial-next-steps.md +53 -0
  297. package/content/tutorial/tutorial-requests-sql.md +22 -0
  298. package/content/tutorial/tutorial-start.md +71 -0
  299. package/content/user-authentication/auth-providers.md +15 -0
  300. package/content/user-authentication/login-and-logout.md +122 -0
  301. package/content/user-authentication/users-introduction.md +31 -0
  302. package/index.json +2281 -0
  303. package/package.json +34 -0
  304. package/scripts/extractAgentDocs.js +130 -0
@@ -0,0 +1,313 @@
1
+ # Amazon S3
2
+
3
+ AWS S3 is a file or data storage solution, provided by Amazon Web Services. S3 does not work like a traditional file system, data is stored as objects in a collection of objects called a bucket.
4
+ Objects can be read from S3 and stored in S3 using web requests. These objects can be public or private. You can read more [here](https://docs.aws.amazon.com/AmazonS3/latest/dev/Welcome.html).
5
+
6
+ Lowdefy integrates with AWS S3 using presigned links. These are links that are authorized to give access to private objects, or that allow you to create new objects, and that expire after a certain amount of time. This allows you to upload or download directly from S3 from the browser.
7
+
8
+ A guide to creating and connecting to an S3 bucket is given at the bottom of this page.
9
+
10
+ ## Connections
11
+
12
+ Connection types:
13
+ - AwsS3Bucket
14
+
15
+ ### AwsS3Bucket
16
+
17
+ The `AwsS3Bucket` connection is used to connect to a AWS S3 bucket. AWS S3 is the file storage solution provided by Amazon Web services.
18
+
19
+ #### Properties
20
+ - `accessKeyId: string`: __Required__ - AWS IAM access key id with s3 access.
21
+ - `secretAccessKey: string`: __Required__ - AWS IAM secret access key with s3 access.
22
+ - `region: string`: __Required__ - AWS region bucket is located in.
23
+ - `bucket: string`: __Required__ - S3 bucket name.
24
+ - `endpoint: string`: Custom S3 API endpoint for S3-compatible providers like Cloudflare R2, MinIO, DigitalOcean Spaces, Backblaze B2, and Wasabi.
25
+ - `forcePathStyle: boolean`: Force path-style bucket addressing (`https://endpoint/bucket/key`). Required by MinIO and some self-hosted S3-compatible setups.
26
+ - `publicUrlBase: string`: Base URL used to construct stable public object URLs (e.g. a CloudFront or CDN domain in front of the bucket). Used by download requests when the request sets `public: true`.
27
+ - `read: boolean`: Default: `true` - Allow reads from the bucket.
28
+ - `write: boolean`: Default: `false` - Allow writes to the bucket.
29
+
30
+ #### Examples
31
+
32
+ ###### Read and writes on a bucket:
33
+ ```yaml
34
+ connections:
35
+ - id: my_bucket
36
+ type: AwsS3Bucket
37
+ properties:
38
+ accessKeyId:
39
+ _secret: S3_ACCESS_KEY_ID
40
+ secretAccessKey:
41
+ _secret: S3_SECRET_ACCESS_KEY
42
+ region: eu-west-1
43
+ bucket: my-bucket-name
44
+ write: true
45
+ ```
46
+ Environment variables:
47
+ ```
48
+ LOWDEFY_SECRET_S3_ACCESS_KEY_ID = AKIAIOSFODNN7EXAMPLE
49
+ LOWDEFY_SECRET_S3_SECRET_ACCESS_KEY = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
50
+ ```
51
+
52
+ ###### S3-compatible provider (Cloudflare R2):
53
+ ```yaml
54
+ connections:
55
+ - id: r2
56
+ type: AwsS3Bucket
57
+ properties:
58
+ endpoint: https://<account>.r2.cloudflarestorage.com
59
+ region: auto
60
+ bucket: my-bucket
61
+ accessKeyId:
62
+ _secret: R2_ACCESS_KEY_ID
63
+ secretAccessKey:
64
+ _secret: R2_SECRET_ACCESS_KEY
65
+ write: true
66
+ ```
67
+ The same connection and requests work against any S3-compatible service — set `endpoint` (and `forcePathStyle: true` for MinIO and most self-hosted setups). Remember to configure CORS on the provider for direct browser uploads.
68
+
69
+ ## Requests
70
+
71
+ Request types:
72
+ - AwsS3GetObject
73
+ - AwsS3PresignedGetObject
74
+ - AwsS3PresignedPostPolicy
75
+ - AwsS3PutObject
76
+
77
+ ### AwsS3PresignedGetObject
78
+
79
+ The `AwsS3PresignedGetObject` request is used to get a download link for an object in AWS S3. Reference the request id in the <a href="/Download">Download</a> block's `downloadPolicyRequestId` property, or open the returned URL with the `Link` action.
80
+
81
+ #### Properties
82
+ - `versionId: string`: VersionId used to reference a specific version of the object.
83
+ - `expires: number`: Number of seconds for which the policy should be valid.
84
+ - `key: string`: __Required__ - Key (or filename) under which object will be stored. If another file is saved with the same key, that file will be overwritten, so a random string in this field is probably needed.
85
+ - `responseContentType: string`: Sets the Content-Type header of the response.
86
+ - `responseContentDisposition: string`: Sets the Content-Disposition header of the response.
87
+ - `public: boolean`: Default: `false` - Return a stable, non-expiring public URL instead of a signed URL — virtual-hosted style by default, path-style on a custom `endpoint`, or `${publicUrlBase}/${key}` when the connection sets `publicUrlBase`. The object must be publicly readable (e.g. uploaded with acl `public-read`); this is author-declared and never checked at runtime. `versionId`, `responseContentType` and `responseContentDisposition` do not apply to public URLs (providers only honor them on signed requests).
88
+
89
+ #### Examples
90
+
91
+ ###### Download a pdf and open in a new tab:
92
+ ```yaml
93
+ requests:
94
+ - id: my_file_link
95
+ type: AwsS3PresignedGetObject
96
+ connectionId: my_bucket_connection
97
+ properties:
98
+ key: pdf-filename-as4dacd.pdf
99
+ responseContentType: application/pdf
100
+
101
+ ...
102
+ blocks:
103
+ - id: getFileButton
104
+ type: Button
105
+ events:
106
+ onClick:
107
+ - id: open_file
108
+ type: Link
109
+ params:
110
+ url:
111
+ _request: my_file_link
112
+ newTab: true
113
+ ```
114
+
115
+ ### AwsS3PresignedPostPolicy
116
+
117
+ The `AwsS3PresignedPostPolicy` request is used to create a policy that allows a file to be uploaded to AWS S3. It returns the standard upload-policy descriptor `{ method: 'POST', url, key, bucket, fields }` used by the <a href="/Upload">Upload</a>, <a href="/UploadPhoto">UploadPhoto</a> and <a href="/UploadDragger">UploadDragger</a> blocks — reference the request id in the block's `uploadPolicyRequestId` property.
118
+
119
+ #### Properties
120
+ - `acl: enum`: Access control lists used to grant read and write access.
121
+ - private
122
+ - public-read
123
+ - public-read-write
124
+ - aws-exec-read
125
+ - authenticated-read
126
+ - bucket-owner-read
127
+ - bucket-owner-full-control
128
+ - `conditions: object[] | string[][]`: Conditions to be enforced on the request. An array of objects, or condition arrays. See [here](https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html).
129
+ - `expires: number`: Number of seconds for which the policy should be valid.
130
+ - `key: string`: __Required__ - Key (or filename) under which object will be stored. If another file is saved with the same key, that file will be overwritten, so a random string in this field is probably needed.
131
+ - `fields: object`: Fields to be included in the form. Useful for adding metadata to the object such as `Content-Type`. See [S3 POST policy](https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html).
132
+
133
+ #### Examples
134
+
135
+ ###### Upload a file with user filename and random id:
136
+ ```yaml
137
+ - id: my_post_policy
138
+ type: AwsS3PresignedPostPolicy
139
+ connectionId: my_bucket_connection
140
+ payload:
141
+ filename:
142
+ _args: filename
143
+ uid:
144
+ _args: uid
145
+ properties:
146
+ key:
147
+ _nunjucks:
148
+ template: uploads/{{filename}}-{{uid}}
149
+ on:
150
+ filename:
151
+ _payload: filename
152
+ uid:
153
+ _payload: uid
154
+ ```
155
+
156
+ ### AwsS3GetObject
157
+
158
+ The `AwsS3GetObject` request reads an object from the bucket on the server and returns its
159
+ content as a base64 encoded string, so [API endpoint](/lowdefy-api) routine steps can process
160
+ file content with operators and pass it to other steps (e.g. transform an uploaded file and
161
+ store the result with `AwsS3PutObject`). The connection must allow reads (`read` is `true`
162
+ by default). Content rides through the routine as base64, so this suits small and medium files.
163
+
164
+ #### Properties
165
+ - `key: string`: __Required__ - Key under which the object is stored.
166
+ - `versionId: string`: VersionId used to reference a specific version of the object.
167
+
168
+ Returns `{ bucket, key, content, contentType, size }` — `content` is the base64 encoded object.
169
+
170
+ #### Examples
171
+
172
+ ###### Read a stored file and re-store a processed copy:
173
+ ```yaml
174
+ api:
175
+ - id: copy_report
176
+ type: Api
177
+ routine:
178
+ - id: get_object
179
+ type: AwsS3GetObject
180
+ connectionId: my_bucket
181
+ properties:
182
+ key:
183
+ _payload: key
184
+ - id: put_copy
185
+ type: AwsS3PutObject
186
+ connectionId: my_bucket
187
+ properties:
188
+ key:
189
+ _string.concat: ['copies/', { _payload: key }]
190
+ content:
191
+ _step: get_object.content
192
+ contentType:
193
+ _step: get_object.contentType
194
+ - ':return':
195
+ key:
196
+ _step: put_copy.key
197
+ ```
198
+
199
+ ### AwsS3PutObject
200
+
201
+ The `AwsS3PutObject` request writes an object to the bucket from the server. It accepts base64 encoded
202
+ content, which makes it the storage half of the server-side file handling pattern: an upload block with
203
+ `emitFileContent: true` sends the file as a base64 payload to an [API endpoint](/lowdefy-api) with the
204
+ `CallAPI` action, and a routine step stores it. The connection must set `write: true`.
205
+
206
+ #### Properties
207
+ - `key: string`: __Required__ - Key under which the object will be stored.
208
+ - `content: string`: __Required__ - Object content as a base64 encoded string.
209
+ - `contentType: string`: MIME type of the object (sets the Content-Type of the stored object).
210
+ - `acl: enum`: Access control lists used to grant read and write access (same values as AwsS3PresignedPostPolicy).
211
+
212
+ #### Examples
213
+
214
+ ###### Store a file sent as an endpoint payload:
215
+ ```yaml
216
+ api:
217
+ - id: store_report
218
+ type: Api
219
+ routine:
220
+ - id: put_object
221
+ type: AwsS3PutObject
222
+ connectionId: my_bucket
223
+ properties:
224
+ key:
225
+ _string.concat:
226
+ - 'reports/'
227
+ - _payload: name
228
+ content:
229
+ _payload: content
230
+ contentType:
231
+ _payload: type
232
+ - ':return':
233
+ key:
234
+ _step: put_object.key
235
+ ```
236
+
237
+ ## Creating a bucket
238
+
239
+ ###### Step 1 - Create an AWS account
240
+
241
+ Go to the [AWS homepage](https://aws.amazon.com/) and create an account if you don't already have one. you can find more information [here](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/).
242
+
243
+ ###### Step 2 - Create an S3 bucket
244
+
245
+ 1. Once logged in, search for S3 in the search box.
246
+ 2. Click 'Create Bucket'
247
+ 3. Choose a name and AWS region for your bucket
248
+ 4. Continue creating the bucket with any extra settings is needed.
249
+ 5. Make sure the 'Block all public access' box is ticked if you don't want to allow public access.
250
+ 6. Click 'Create Bucket'
251
+
252
+ ###### Step 3 - Set the CORS settings for your bucket
253
+
254
+ CORS, or Cross-Origin Resource Sharing is a security feature that is used to restrict web applications from accessing resources from different origins, or domain names. To allow your Lowdefy app to access the contents of the bucket, you need to add a CORS rule on the bucket that authorizes your app
255
+
256
+ 1. Click on you bucket.
257
+ 2. Click on the 'Permissions' tab.
258
+ 3. Click on the 'CORS Configuration' tab.
259
+ 4. Paste this configuration and save (Fill in your own Lowdefy domain name).
260
+
261
+ ```json
262
+ [
263
+ {
264
+ "AllowedHeaders": [
265
+ "*"
266
+ ],
267
+ "AllowedMethods": [
268
+ "GET", "PUT", "POST", "DELETE", "HEAD"
269
+ ],
270
+ "AllowedOrigins": [
271
+ "https://YOUR_LOWDEFY_DOMAIN_HERE"
272
+ ],
273
+ "ExposeHeaders": []
274
+ }
275
+ ]
276
+ ```
277
+
278
+ ###### Step 4 - Create an IAM user
279
+
280
+ IAM is the AWS identity and access management system. This can be used to give very granular access permissions. We will create a programmatic user that has the rights to read and write objects in the Bucket.
281
+
282
+ 1. In the 'Services' dropdown in the header, search for 'IAM'.
283
+ 2. Click on 'Users' in the menu on the left.
284
+ 3. Click 'Add User'
285
+ 4. Choose a descriptive name for the user.
286
+ 5. Choose programmatic access and click next.
287
+ 6. Choose 'Attach existing policies directly'.
288
+ 7. Choose 'Create Policy'.
289
+ 8. Choose the JSON tab and paste the following (Fill in your own bucket name):
290
+ ```JSON
291
+ {
292
+ "Version": "2012-10-17",
293
+ "Statement": [
294
+ {
295
+ "Sid": "ListObjectsInBucket",
296
+ "Effect": "Allow",
297
+ "Action": ["s3:ListBucket"],
298
+ "Resource": ["arn:aws:s3:::YOUR_BUCKET_NAME_HERE"]
299
+ },
300
+ {
301
+ "Sid": "AllObjectActions",
302
+ "Effect": "Allow",
303
+ "Action": "s3:*Object",
304
+ "Resource": ["arn:aws:s3:::YOUR_BUCKET_NAME_HERE/*"]
305
+ }
306
+ ]
307
+ }
308
+ ```
309
+
310
+ 9. Choose review policy and save.
311
+ 10. In your previous tab, refresh and search for the policy you just created. Attach it to the user.
312
+ 11. Click next, review and create the user.
313
+ 12. Set the access key id and secret access key in your Lowdefy secrets store.
@@ -0,0 +1,133 @@
1
+ # Azure Blob Storage
2
+
3
+ Azure Blob Storage is the object storage service provided by Microsoft Azure. Data is stored as blobs in containers within a storage account. You can read more [here](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction).
4
+
5
+ Lowdefy integrates with Azure Blob Storage using SAS (shared access signature) tokens — short-lived credentials that let the browser upload and download blobs directly, without file content passing through the Lowdefy server. Azure uploads use a `PUT` request with the file as the raw request body, which the provider-neutral <a href="/Upload">Upload</a> and <a href="/Download">Download</a> blocks handle automatically.
6
+
7
+ Direct browser uploads require [CORS configuration on the storage account](https://learn.microsoft.com/en-us/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) that allows your app's origin.
8
+
9
+ ## Connections
10
+
11
+ Connection types:
12
+ - AzureBlobContainer
13
+
14
+ ### AzureBlobContainer
15
+
16
+ The `AzureBlobContainer` connection is used to connect to an Azure Blob Storage container.
17
+
18
+ #### Properties
19
+ - `account: string`: __Required__ - Azure storage account name.
20
+ - `accountKey: string`: __Required__ - Azure storage account access key.
21
+ - `container: string`: __Required__ - Blob container name.
22
+ - `publicUrlBase: string`: Base URL used to construct stable public object URLs (e.g. a CDN domain in front of the container). Used by download requests when the request sets `public: true`.
23
+ - `read: boolean`: Default: `true` - Allow reads from the container.
24
+ - `write: boolean`: Default: `false` - Allow writes to the container.
25
+
26
+ #### Examples
27
+
28
+ ###### Reads and writes on a container:
29
+ ```yaml
30
+ connections:
31
+ - id: blob
32
+ type: AzureBlobContainer
33
+ properties:
34
+ account: mystorageacct
35
+ container: uploads
36
+ accountKey:
37
+ _secret: AZURE_STORAGE_KEY
38
+ write: true
39
+ ```
40
+ Environment variables:
41
+ ```
42
+ LOWDEFY_SECRET_AZURE_STORAGE_KEY = your-storage-account-key
43
+ ```
44
+
45
+ ## Requests
46
+
47
+ Request types:
48
+ - AzureBlobUploadSas
49
+ - AzureBlobDownloadSas
50
+ - AzureBlobGet
51
+ - AzureBlobPut
52
+
53
+ ### AzureBlobUploadSas
54
+
55
+ The `AzureBlobUploadSas` request mints a write SAS URL for direct browser uploads. It returns the standard upload-policy descriptor `{ method: 'PUT', url, key, bucket, headers }` (with the `x-ms-blob-type: BlockBlob` header) used by the <a href="/Upload">Upload</a>, <a href="/UploadPhoto">UploadPhoto</a> and <a href="/UploadDragger">UploadDragger</a> blocks — reference the request id in the block's `uploadPolicyRequestId` property. The connection must set `write: true`.
56
+
57
+ #### Properties
58
+ - `key: string`: __Required__ - Key (blob name) under which the object will be stored. If another file is saved with the same key, that file will be overwritten, so a random string in this field is probably needed.
59
+ - `expires: number`: Default: `3600` - Number of seconds for which the SAS token should be valid.
60
+ - `contentType: string`: MIME type set as the Content-Type header of the upload.
61
+
62
+ #### Examples
63
+
64
+ ###### Upload a file with the user's filename:
65
+ ```yaml
66
+ requests:
67
+ - id: upload_policy
68
+ type: AzureBlobUploadSas
69
+ connectionId: blob
70
+ payload:
71
+ name:
72
+ _event: file.name
73
+ properties:
74
+ key:
75
+ _string.concat:
76
+ - 'uploads/'
77
+ - _payload: name
78
+ ```
79
+
80
+ ### AzureBlobDownloadSas
81
+
82
+ The `AzureBlobDownloadSas` request mints a read SAS URL for downloads. Reference the request id in the <a href="/Download">Download</a> block's `downloadPolicyRequestId` property, or open the returned URL with the `Link` action.
83
+
84
+ #### Properties
85
+ - `key: string`: __Required__ - Key (blob name) under which the object is stored.
86
+ - `expires: number`: Default: `3600` - Number of seconds for which the SAS token should be valid.
87
+ - `public: boolean`: Default: `false` - Return a stable, non-expiring public URL (`https://{account}.blob.core.windows.net/{container}/{key}`, or `${publicUrlBase}/${key}` when the connection sets `publicUrlBase`) instead of a SAS URL. The blob must be publicly readable (public container access); this is author-declared and never checked at runtime.
88
+ - `contentDisposition: string`: Sets the Content-Disposition header of the response.
89
+ - `contentType: string`: Sets the Content-Type header of the response.
90
+
91
+ ### AzureBlobGet
92
+
93
+ The `AzureBlobGet` request reads a blob from the container on the server and returns its content
94
+ as a base64 encoded string, so [API endpoint](/lowdefy-api) routine steps can process file content
95
+ with operators and pass it to other steps. The connection must allow reads (`read` is `true` by
96
+ default). Returns `{ bucket, key, content, contentType, size }`.
97
+
98
+ #### Properties
99
+ - `key: string`: __Required__ - Key (blob name) under which the blob is stored.
100
+
101
+ ### AzureBlobPut
102
+
103
+ The `AzureBlobPut` request writes a block blob to the container from the server. It accepts base64 encoded content, which makes it the storage half of the server-side file handling pattern: an upload block with `emitFileContent: true` sends the file as a base64 payload to an [API endpoint](/lowdefy-api) with the `CallAPI` action, and a routine step stores it. The connection must set `write: true`.
104
+
105
+ #### Properties
106
+ - `key: string`: __Required__ - Key (blob name) under which the blob will be stored.
107
+ - `content: string`: __Required__ - Blob content as a base64 encoded string.
108
+ - `contentType: string`: MIME type of the blob (sets the Content-Type of the stored blob).
109
+
110
+ #### Examples
111
+
112
+ ###### Store a file sent as an endpoint payload:
113
+ ```yaml
114
+ api:
115
+ - id: store_report
116
+ type: Api
117
+ routine:
118
+ - id: put_object
119
+ type: AzureBlobPut
120
+ connectionId: blob
121
+ properties:
122
+ key:
123
+ _string.concat:
124
+ - 'reports/'
125
+ - _payload: name
126
+ content:
127
+ _payload: content
128
+ contentType:
129
+ _payload: type
130
+ - ':return':
131
+ key:
132
+ _step: put_object.key
133
+ ```