rework data function to provide filesize

This commit is contained in:
tsmethurst 2022-01-23 14:41:58 +01:00
commit c157b1b20b
12 changed files with 56 additions and 57 deletions

View file

@ -42,7 +42,7 @@ func (d *deref) GetRemoteMedia(ctx context.Context, requestingUsername string, a
return nil, fmt.Errorf("GetRemoteMedia: error parsing url: %s", err)
}
dataFunc := func(innerCtx context.Context) (io.Reader, error) {
dataFunc := func(innerCtx context.Context) (io.Reader, int, error) {
return t.DereferenceMedia(innerCtx, derefURI)
}