Page MenuHomePhabricator

[keyserver] Implement endpoint to upload external blob metadata
ClosedPublic

Authored by bartek on Apr 25 2023, 11:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 5:39 AM
Unknown Object (File)
Sun, Nov 24, 5:39 AM
Unknown Object (File)
Sun, Nov 24, 5:39 AM
Unknown Object (File)
Tue, Nov 12, 12:34 AM
Unknown Object (File)
Tue, Nov 5, 8:58 AM
Unknown Object (File)
Tue, Oct 29, 5:48 PM
Unknown Object (File)
Oct 28 2024, 1:44 AM
Unknown Object (File)
Oct 25 2024, 7:14 AM
Subscribers

Details

Summary

For Blob service hosted multimedia, we don't store their content in the uploads table, but still need to store their metadata (dimensions, encryption key etc). This diff implements the endpoint code to upload this metadata. In contrast to the upload_multimedia, both input and output are JSON so we can use tcomb instead of manual validation.

The endpoint will be exposed in the next diff.

Depends on D7618

Test Plan

This is tested in the next diff in the stack.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Apr 25 2023, 11:46 AM

Rebase. Adjusted to changes in parent diff

atul added inline comments.
keyserver/src/uploads/uploads.js
111 ↗(On Diff #25808)

Extremely minor nit, but we typically do const request in the rest of the codebase:

908629.png (1×844 px, 344 KB)

125 ↗(On Diff #25808)

We could destructure all of the fields of req above, might make things more readable?

Again, defer to you it's not a big deal

lib/types/media-types.js
117–118 ↗(On Diff #25808)

We have a Dimensions type (lib/types/media-types) that could be used here?

Up to you, you have more context

This revision is now accepted and ready to land.May 3 2023, 10:01 AM
lib/types/media-types.js
117–118 ↗(On Diff #25808)

The reason is that I wanted to keep the payload message flat.
I can possibly do ...Dimensions to avoid redefining width and height