hyperledger-archives / aries-framework-dotnet

Aries Framework .NET for building multiplatform SSI services
https://wiki.hyperledger.org/display/aries
Apache License 2.0
84 stars 74 forks source link

Retrieve attachments #192

Open mturetchi opened 3 years ago

mturetchi commented 3 years ago

Hello, I want to send a file as an attachment for CredentialOfferMessage calling the extension method AttachExtensions.AddAttachment https://github.com/hyperledger/aries-framework-dotnet/blob/ee0ec833ff80f166fd1250dcd49f1e223ef964c0/src/Hyperledger.Aries/Decorators/Attachments/AttachExtensions.cs#L17

From another instance of WebAgent, I noticed that in addition to the credentials sent, I receive the attached file, here: https://github.com/hyperledger/aries-framework-dotnet/blob/ee0ec833ff80f166fd1250dcd49f1e223ef964c0/src/Hyperledger.Aries/Features/IssueCredential/DefaultCredentialService.cs#L239

Everything is OK so far...

My question, is this Attachment kept somewhere or is it possible to get it after a while or has such functionality not yet been implemented?

Thank you in advance!

IonTirsina commented 3 years ago

Pr pr

sahil-khanna commented 2 years ago

@mturetchi, you may want to store the encoded attachment string in the tag attribute of the record with which the attachment was received.

mturetchi commented 2 years ago

@mturetchi, you may want to store the encoded attachment string in the tag attribute of the record with which the attachment was received.

I don't know if it's efficient to store encoded file in tags... I initially thought that the attachments were intended for something like that, but it seems that they are not fully implemented...

sahil-khanna commented 2 years ago

@mturetchi, alternately, you may write the attachment (file) in the device file system and store the path in the tag of the record.

mturetchi commented 2 years ago

@mturetchi, alternately, you may write the attachment (file) in the device file system and store the path in the tag of the record.

thanks for the idea, we will take this as an option