@@ -47,7 +47,7 @@ func (r *AssetService) Download(ctx context.Context, body AssetDownloadParams, o
4747 opts = slices .Concat (r .Options , opts )
4848 path := "v1/assets/download"
4949 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , body , & res , opts ... )
50- return
50+ return res , err
5151}
5252
5353// Stream a file given an mxc://, localmxc://, or file:// URL. Downloads first if
@@ -57,7 +57,7 @@ func (r *AssetService) Serve(ctx context.Context, query AssetServeParams, opts .
5757 opts = append ([]option.RequestOption {option .WithHeader ("Accept" , "*/*" )}, opts ... )
5858 path := "v1/assets/serve"
5959 err = requestconfig .ExecuteNewRequest (ctx , http .MethodGet , path , query , nil , opts ... )
60- return
60+ return err
6161}
6262
6363// Upload a file to a temporary location using multipart/form-data. Returns an
@@ -66,7 +66,7 @@ func (r *AssetService) Upload(ctx context.Context, body AssetUploadParams, opts
6666 opts = slices .Concat (r .Options , opts )
6767 path := "v1/assets/upload"
6868 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , body , & res , opts ... )
69- return
69+ return res , err
7070}
7171
7272// Upload a file using a JSON body with base64-encoded content. Returns an uploadID
@@ -76,7 +76,7 @@ func (r *AssetService) UploadBase64(ctx context.Context, body AssetUploadBase64P
7676 opts = slices .Concat (r .Options , opts )
7777 path := "v1/assets/upload/base64"
7878 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , body , & res , opts ... )
79- return
79+ return res , err
8080}
8181
8282type AssetDownloadResponse struct {
0 commit comments