diff --git a/commonfile/fileservice/fileservice.go b/commonfile/fileservice/fileservice.go index 0202fb02..0c23a5fc 100644 --- a/commonfile/fileservice/fileservice.go +++ b/commonfile/fileservice/fileservice.go @@ -31,6 +31,8 @@ type FileService interface { GetFile(ctx context.Context, c cid.Cid) (ufsio.ReadSeekCloser, error) // AddFile adds file to ipfs storage AddFile(ctx context.Context, r io.Reader) (ipld.Node, error) + // DAGService returns ipld.DAGService object + DAGService() ipld.DAGService app.Component } @@ -60,6 +62,10 @@ func (fs *fileService) Name() string { return CName } +func (fs *fileService) DAGService() ipld.DAGService { + return fs.merkledag +} + func (fs *fileService) AddFile(ctx context.Context, r io.Reader) (ipld.Node, error) { dbp := helpers.DagBuilderParams{ Dagserv: fs.merkledag,