Skip to content

Commit 23f8951

Browse files
feat: Add Files Upload tab with manual file download request (#1270)
Add `file_download_requests: :relay` to `paginate_relationship_with` in `Device`, enabling cursor-based pagination over a device's file download requests consistent with other paginated relationships. - Add FilesUploadTab with a 4-step upload flow: `compute SHA-256 digest` → `fetch presigned PUT URL` → `upload to S3` → `create FileDownloadRequest via GraphQL mutation` - Add ManualFileDownloadRequestForm with destination, TTL, and progress fields validated via zod - Add FileDownloadRequestsTable showing request history Signed-off-by: Omar <omar.brbutovic@secomind.com>
1 parent 00c7e64 commit 23f8951

File tree

13 files changed

+2753
-158
lines changed

13 files changed

+2753
-158
lines changed

backend/lib/edgehog/devices/device/device.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ defmodule Edgehog.Devices.Device do
6161
# datalayer subqueries so Ash can compose and support the functionality.
6262
paginate_relationship_with application_deployments: :relay,
6363
ota_operations: :relay,
64-
tags: :relay
64+
tags: :relay,
65+
file_download_requests: :relay
6566

6667
subscriptions do
6768
pubsub EdgehogWeb.Endpoint

frontend/package-lock.json

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"class-variance-authority": "^0.7.1",
3434
"clsx": "^2.1.1",
3535
"dayjs": "^1.11.19",
36+
"fflate": "^0.8.2",
3637
"graphql": "^16.9.0",
3738
"history": "^5.1.0",
3839
"js-cookie": "^3.0.5",
@@ -59,6 +60,7 @@
5960
"tailwind-merge": "^3.4.0",
6061
"tw-animate-css": "^1.4.0",
6162
"typescript": "^5.5.3",
63+
"uuid": "^13.0.0",
6264
"vite": "^7.3.1",
6365
"vite-plugin-eslint": "^1.8.1",
6466
"vite-plugin-relay-lite": "^0.12.0",

0 commit comments

Comments
 (0)