upload from file using presigned URL in amplify gen2
Environment information
Want a way to upload a file via amplify gen2 using a signed url instead of the fileUpload function.
Describe the feature
Need to be able to write files via a custom library using a pre-signed URL for file upload. I see this example in the docs, does it support file upload or only file download?
import { getUrl } from 'aws-amplify/storage';
const linkToStorageFile = await getUrl({
path: "album/2024/1.jpg",
// Alternatively, path: ({identityId}) => `album/{identityId}/1.jpg`
});
console.log('signed URL: ', linkToStorageFile.url);
console.log('URL expires at: ', linkToStorageFile.expiresAt);
Use case
Need to upload using a custom httpfs library that does processing.
Hey,👋 thanks for raising this! I'm going to transfer this over to our JS repository for better assistance 🙂
Hi @cookiejest thanks for reaching out. Currently, the getUrl API provided by the Storage category supports only download operations. We will look into this as a feature request.
if you enabled upload via a http path would be able to write directly to s3 from tools like duckdb and you would get alot more use cases covered with amplify gen2.
Appreciate the additional context and use case, @cookiejest. We'll add that to our list of things to review with this feature request and provide any updates on progress as we make it.
+1
Hi @hasadata , thank you for your interest. We're still evaluating this feature request internally. Will provide an update here when we've made progress on it.