First commit

This commit is contained in:
2025-12-01 12:52:26 +01:00
commit 4ba01976eb
5 changed files with 698 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#include <stdio.h>
#include "s3.h"
int main(void)
{
char dst[1<<10];
int len = s3_presign_url(
S3_S("bucket"),
S3_S("object"),
S3_S("GET"),
3600,
S3_S(""),
S3_S("accesskey"),
S3_S("secretkey"),
S3_S("us-west-1"),
S3_S("s3"),
S3_S("aws.com"),
time(NULL),
dst, sizeof(dst));
if (len < 0) {
fprintf(stderr, "Failed (ret=%d)\n", len);
return -1;
}
printf("Success! (ret=%d)\n\n%.*s\n", len, len, dst);
return 0;
}