Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to upload S3 presigned URL #1944

Open
ngoquoctoandev opened this issue Dec 31, 2024 · 0 comments
Open

How to upload S3 presigned URL #1944

ngoquoctoandev opened this issue Dec 31, 2024 · 0 comments

Comments

@ngoquoctoandev
Copy link

ngoquoctoandev commented Dec 31, 2024

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant