Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: Implement IPFS storage on upload #1663

Merged
merged 2 commits into from
Mar 9, 2023
Merged

Conversation

victorges
Copy link
Member

What does this pull request do? Explain your changes. (required)
Basically copied the patch logic to upload and that's it!

Specific updates (required)

  • Move schema to new-asset-payload and reference it from patch
  • Extract helper to convert the storageInput request to the asset state
  • Set storage field on the created asset
  • profit! task-runner will already copy the asset to IPFS here

How did you test each of these updates (required)
Actually haven't, only a PoC and it's pretty late.

Should be pretty easy tho just call any /upload endpoint with storage.ipfs = true for example.

Does this pull request close any open issues?
Implements API-17

Checklist

  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@victorges victorges requested a review from a team as a code owner March 4, 2023 00:14
@vercel
Copy link

vercel bot commented Mar 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
livepeer-studio ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 6, 2023 at 2:50PM (UTC)

@victorges victorges changed the base branch from master to vg/fix/broke-up-recordings March 4, 2023 00:58
@victorges victorges changed the base branch from vg/fix/broke-up-recordings to master March 6, 2023 14:48
Copy link
Member

@gioelecerati gioelecerati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

properties:
spec:
oneOf:
- type: "null"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, I saw it was already like that, but Is this how the null type is defined here? Is it required to be a string in quotation marks?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, actually for YAML it's just a string, but I think null is a special keyword since it also exists in JSON. If we used null here, this object would have a {"type": null} field (no type on JSON) instead of a {"type": "null"} (null type on JSON schema). ref

@victorges victorges merged commit fa4fde9 into master Mar 9, 2023
@victorges victorges deleted the vg/feat/upload-ipfs branch March 9, 2023 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants