Skip to content

How to upload S3 presigned URL #1944

@ngoquoctoandev

Description

@ngoquoctoandev
public interface IMyApi
{
 [Multipart]
 [Put("")]
 Task<BaseResponse> UploadFileAsync([Url] string dynamicUrl, StreamPart stream, CancellationToken cancellationToken = default);
 }
await api.UploadFileAsync(
            presignedUrl,
            new StreamPart(new MemoryStream(fileContent), request.FileName), cancellationToken).ConfigureAwait(false);

When I set the attribute [Put("")], when running the program it does not automatically pass the dynamic url in to replace it.
it doesn't seem to work

Base address of IMyApi: https://example.com
presignedUrl: https://s3.amazon.com/xyz/abc...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions