amplify-js icon indicating copy to clipboard operation
amplify-js copied to clipboard

upload from file using presigned URL in amplify gen2

Open cookiejest opened this issue 11 months ago • 6 comments

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.

cookiejest avatar Jan 03 '25 08:01 cookiejest

Hey,👋 thanks for raising this! I'm going to transfer this over to our JS repository for better assistance 🙂

ykethan avatar Jan 03 '25 16:01 ykethan

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.

HuiSF avatar Jan 03 '25 16:01 HuiSF

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.

cookiejest avatar Jan 07 '25 22:01 cookiejest

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.

cwomack avatar Jan 08 '25 17:01 cwomack

+1

hasadata avatar Sep 05 '25 23:09 hasadata

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.

Simone319 avatar Sep 08 '25 15:09 Simone319