aries-framework-dotnet icon indicating copy to clipboard operation
aries-framework-dotnet copied to clipboard

Retrieve attachments

Open mturetchi opened this issue 3 years ago • 5 comments

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!

mturetchi avatar Jul 06 '21 16:07 mturetchi

Pr pr

IonTirsina avatar Jul 09 '21 07:07 IonTirsina

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

sahil-khanna avatar Jul 13 '21 06:07 sahil-khanna

@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...

mturetchi avatar Jul 14 '21 13:07 mturetchi

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

sahil-khanna avatar Jul 14 '21 15:07 sahil-khanna

@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

mturetchi avatar Jul 15 '21 14:07 mturetchi