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

Handle attachments in a generic way #548

Closed
jakubkoci opened this issue Nov 24, 2021 · 3 comments
Closed

Handle attachments in a generic way #548

jakubkoci opened this issue Nov 24, 2021 · 3 comments

Comments

@jakubkoci
Copy link
Contributor

jakubkoci commented Nov 24, 2021

We should add something to handle attachments in a generic way (ACA-Py has it). Data could be base64 or json (or others but the first two are most important)

Currently we assume base64 everywhere and use the data.base64, but it could also be in json form.

// new
const data = request.data.get() // could be either json or base64, but it doesn't matter

// old
const base64 = request.data.base64 // could be null
const data = base64decode(base64)

const data = request.data.json

Should be updated in packages/core/src/decorators/attachment/Attachment.ts

Originally posted by @TimoGlastra in #531 (comment)

@jakubkoci
Copy link
Contributor Author

jakubkoci commented Nov 24, 2021

That could be good, at least for base64 and json. However, if I look at Aries RFC 0017: Attachments it can also contain links. Should we call some HTTP request in that case or just return the link?

@TimoGlastra
Copy link
Contributor

@morrieinmaas and @Annelein will be working on this

@TimoGlastra
Copy link
Contributor

Fixed

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

No branches or pull requests

2 participants