diff options
| author | 2022-01-23 14:41:58 +0100 | |
|---|---|---|
| committer | 2022-01-23 14:41:58 +0100 | |
| commit | c157b1b20b38cc331cfd1673433d077719feef3f (patch) | |
| tree | 69777c5d300ed87d0ac8bb0daf51d8ffa4c4ddb7 /internal/transport/transport.go | |
| parent | use exif-terminator (diff) | |
| download | gotosocial-c157b1b20b38cc331cfd1673433d077719feef3f.tar.xz | |
rework data function to provide filesize
Diffstat (limited to 'internal/transport/transport.go')
| -rw-r--r-- | internal/transport/transport.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/transport/transport.go b/internal/transport/transport.go index d9650d952..9e8cd8213 100644 --- a/internal/transport/transport.go +++ b/internal/transport/transport.go @@ -34,8 +34,8 @@ import ( // functionality for fetching remote media. type Transport interface { pub.Transport - // DereferenceMedia fetches the given media attachment IRI. - DereferenceMedia(ctx context.Context, iri *url.URL) (io.ReadCloser, error) + // DereferenceMedia fetches the given media attachment IRI, returning the reader and filesize. + DereferenceMedia(ctx context.Context, iri *url.URL) (io.ReadCloser, int, error) // DereferenceInstance dereferences remote instance information, first by checking /api/v1/instance, and then by checking /.well-known/nodeinfo. DereferenceInstance(ctx context.Context, iri *url.URL) (*gtsmodel.Instance, error) // Finger performs a webfinger request with the given username and domain, and returns the bytes from the response body. |
