amplify-js
amplify-js copied to clipboard
AWS storage upload issue
Before opening, please confirm:
- [X] I have searched for duplicate or closed issues and discussions.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
JavaScript Framework
React
Amplify APIs
Storage
Amplify Version
v6
Amplify Categories
storage
Backend
None
Environment information
# Put output below this line
OS: Linux 6.8 Pop!_OS 22.04 LTS
CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz
Memory: 42.07 GB / 62.42 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node
npm: 9.8.1 - ~/.nvm/versions/node/v18.18.0/bin/npm
pnpm: 9.1.0 - ~/.nvm/versions/node/v18.18.0/bin/pnpm
Browsers:
Chrome: 125.0.6422.76
npmPackages:
@aws-amplify/backend: ^1.0.2 => 1.0.2
@aws-amplify/ui-react: ^6.1.9 => 6.1.9
@aws-amplify/ui-react-core: ^3.0.14 => 3.0.14
@heroicons/react: ^2.1.3 => 2.1.3
@types/react: ^18.2.66 => 18.3.2
@types/react-dom: ^18.2.22 => 18.3.0
@typescript-eslint/eslint-plugin: ^7.2.0 => 7.8.0
@typescript-eslint/parser: ^7.2.0 => 7.8.0
@vitejs/plugin-react-swc: ^3.5.0 => 3.6.0
autoprefixer: ^10.4.19 => 10.4.19
aws-amplify: ^6.3.0 => 6.3.0
clsx: ^2.1.1 => 2.1.1
eslint: ^8.57.0 => 8.57.0
eslint-plugin-react-hooks: ^4.6.0 => 4.6.2
eslint-plugin-react-refresh: ^0.4.6 => 0.4.7
framer-motion: ^10.10.0 => 10.18.0
postcss: ^8.4.38 => 8.4.38
react: ^18.2.0 => 18.3.1
react-dom: ^18.2.0 => 18.3.1
react-dropzone: ^14.2.3 => 14.2.3
react-icons: ^4.8.0 => 4.12.0
react-router-dom: ^6.9.0 => 6.23.1
react-toastify: ^9.1.2 => 9.1.3
tailwind-merge: ^2.3.0 => 2.3.0
tailwindcss: ^3.4.3 => 3.4.3
typescript: ^5.2.2 => 5.4.5
vite: ^5.2.0 => 5.2.11
npmGlobalPackages:
@withgraphite/graphite-cli: 1.3.4
corepack: 0.19.0
nodemon: 3.1.0
npm: 9.8.1
pnpm: 9.1.1
typescript: 5.4.5
Describe the bug
trying to upload a APK file to S3 bucket but facing Multipart issue
Expected behavior
Just normal file upload
Reproduction steps
Code
> const handleFileSelect = async (file: File) => {
> try {
> const awsfile = uploadData({
> data: file,
> path({ identityId }) {
> return `uploads/${identityId}/test_${file.name}`;
> },
> options: {
> // metadata: {
> // date: `${Date.now()}`,
> // },
> contentEncoding: "base64",
> contentType: "application/vnd.android.package-archive",
> contentDisposition: "attachment",
> onProgress: ({ transferredBytes, totalBytes }) => {
> if (totalBytes) {
> console.log(
> `Upload progress ${Math.round(
> (transferredBytes / totalBytes) * 100
> )} %`
> );
> }
> },
> },
> }).result;
>
> console.log(awsfile.then((res) => console.log(res)));
> } catch (err) {
> console.log(err);
> }
>
Code Snippet
// Put your code below this line.
Log output
// Put your logs below this line
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response