restore #6314 to d30c93df37
- merged `main` to it
- resolved confilicts
- squashed all commits into a single commit and sign it ( I had to do
this as signing the past unsigned commits was difficult it was messing
up the history everytime I tried )
The Norwegian Bokmål (`nb_NO`) locale had fallen behind `en_US` by ~55
strings. This brings it up to date.
**Added** translations for the missing keys, including: AI image
generation (`generateImage`, `generating1`–`5`), audio recording
(`allowAudioAccess*`, `noAudio*`, `startAudioRecording`,
`stopAudioRecording`), required meta fields
(`missingRequiredMetaField*`), session recovery (`recoveredAllFiles`,
`recoveredXFiles`, `sessionRestored`), plugin names (`pluginName*`),
image compression (`compressedX`, `compressingImages`), and various UI
strings (`error`, `search`, `pleaseWait`, `unnamed`, `uploadStalled`,
etc.).
**Removed** keys no longer present in `en_US` (`backToSearch`,
`fileSource`, `selectFileNamed`, `timedOut`, `unselectFileNamed`).
**Fixed** `exceedsSize` to include the `%{file}` placeholder, and
aligned key order with `en_US`.
I'm a native Norwegian speaker and reviewed every string. Translation
was done with AI assistance (Claude) and checked by me.
---------
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
- add support for remote uploads
- add support for restore using golden-retriever
- update examples
- #6181 still persists
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
right now whenever you upload any file through multipart upload you'll
find empty body returned in `upload-success` event
cause : response from completeMultipartRequest returned in CamelCase
which was not parsed correctly
```xml
<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Location>https://testbucketnewfix.s3.eu-north-1.amazonaws.com/13febe01-8d5b-4ed3-bda1-9620fc37c694-VSCode-darwin-universal.dmg</Location><Bucket>testbucketnewfix</Bucket><Key>13febe01-8d5b-4ed3-bda1-9620fc37c694-VSCode-darwin-universal.dmg</Key><ETag>"be4129821e06a893b453f1373995202b-49"</ETag><ChecksumCRC64NVME>Wjr7mcJOfU0=</ChecksumCRC64NVME><ChecksumType>FULL_OBJECT</ChecksumType></CompleteMultipartUploadResult>
```
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- removed old examples , entirely remove withCustomEndpoints.html as
every s3 operations are now handled by s3mini so no need of it.
- add new examples and update README.md
shouldUseMultipart: true was not working due to signature mismatch
AI summary :
This pull request improves support for specifying the `contentType`
during S3 uploads, ensuring that the correct content type is set when
generating presigned URLs for both single and multipart uploads. It also
updates the client-side and server-side code to handle this new
parameter.
**Backend and API enhancements:**
- Updated the `/s3/presign` endpoint in `index.js` to accept an optional
`contentType` parameter and to include it in the S3 `PutObjectCommand`
and `CreateMultipartUploadCommand` requests, defaulting to
`'application/octet-stream'` if not provided.
[[1]](diffhunk://#diff-0c4471088c62917198e1438777b4c7e78fd4d87d450d2a7c78b86b7c647ac97bL360-R360)
[[2]](diffhunk://#diff-0c4471088c62917198e1438777b4c7e78fd4d87d450d2a7c78b86b7c647ac97bR384-R391)
**Client-side and types improvements:**
- Added `contentType` to the `presignableRequest` type to ensure type
safety and clarity when passing this parameter.
- Modified the S3 client (`S3.ts`) to include `contentType` when making
presign requests.
- Updated the example HTML (`rewrite-test.html`) to send `contentType`
in presign requests and enabled multipart uploads for testing.
[[1]](diffhunk://#diff-ca9bc28a71d2d8ac4e0aa6844698f2244594a12e695fc3e153db36674ccb2b52L103-R103)
[[2]](diffhunk://#diff-ca9bc28a71d2d8ac4e0aa6844698f2244594a12e695fc3e153db36674ccb2b52R114)
Cherry-picked as the previous branch got messy ( from last PR )
- XHR-based uploads using `@uppy/utils/fetcher`
- Silent offline detection (without treating it as an error) with
automatic resume ( inspired from old plugin code )
- Retry with backoff using fetcher defaults:
- Max retries: 3
- Delays: 300ms → 600ms → 1200ms
- Retries on 5xx and 429; skips other 4xx errors
- S3 Error Mappings
Working :
- Simple uploads (putObject)
- Multipart uploads
- Pause / Resume / Abort , Resume works using listParts as before
- Progress tracking per chunk ( `#onProgress` ) - this is temporary ,
until we implement xhr based progress tracking as - before.
**added new examples to examples/aws-nodejs to test the rewrite , old
examples will eventually be removed**
Not Yet Implemented
- Rate limiting – Currently uploads are sequential
- Retries
- Remote file uploads – Files from Google Drive, Dropbox, etc.
XHR progress
- full wiring with uppy state ( I saw few state bugs while testing it
manually )
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Murderlon <merlijn@soverin.net>
#### This PR replaces signed headers with presigned urls , for signing.
- I implemented this along with the uploader rewrite , but raised PR for
this it separately to reduce diffs.
- `signer.ts` now returns signed url , which is directly used by
`_presignedRequest` method to make calls to s3
- tested it with uploader rewrite working fine.
---------
Co-authored-by: Murderlon <merlijn@soverin.net>
- added `getCredentials` callback in `S3Config`
- simplified signer test util ( `sigv4-signer.js` ) and moved to
`src/signer.ts`
- all tests run in a new non root minio user ( required for sts ) ,
which gets created before the tests start see `tests/s3-client/setup.js`
- tests added for sts , using `@aws-sdk/client-sts` for getting creds.
- credential caching inspired from the current implementation in
`@aws-s3` plugin , see `#getTemporarySecurityCredentials` inside
`@uppy/aws-s3/src/index.ts`
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
AI disclaimer : AI used
## Changes
- **jsdom 26 → 29** across all packages' devDependencies —
**except`@uppy/aws-s3`** (left at 26; that plugin is being rewritten and
its deps are handled on the rewrite branch).
- **`@uppy/xhr-upload` unit tests migrated from nock to MSW**, and
`nock` dropped from its devDependencies.
## Why the test migration was needed
jsdom **28** overhauled resource loading so `XMLHttpRequest` now goes
through jsdom's internal (undici-based) fetch instead of Node's `http`
module ([jsdom 28 release
notes](https://github.com/jsdom/jsdom/releases/tag/28.0.0)).
nock intercepts at the Node `http` / `http.ClientRequest` layer ([nock
README](https://github.com/nock/nock)), so it can no longer see uppy's
upload requests — the mocked responses never arrive and the tests time
out. (This is the long-standing nock + jsdom XHR incompatibility:
[nock#518](https://github.com/nock/nock/issues/518).)
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Part of the dev-dependency major-version upgrades. These required code
changes so they're split out from the no-code-change batch (#6315).
**AI Disclaimer** : AI Used
- **glob 8 → 13** — `@uppy/locales` scripts: the callback API was
removed, so `getPaths()` uses the promise form and `test.mjs` uses the
named `globSync`.
- **npm-packlist 5 → 11** — `upload-to-cdn.js`: v7+ takes an
`@npmcli/arborist` tree instead of `{ path }`; loads the tree and passes
it to `packlist()`. Adds `@npmcli/arborist` as a devDependency.
- **nock 13 → 14** (`@uppy/companion`) — the v14 @mswjs/interceptors
rewrite crashed the SSRF tests in `http-agent.test.ts`; nock
interception is now kept off by default and only activated for the one
test that mocks a host.
- **@types/use-sync-external-store 0 → 1** — `@uppy/react`: v1's exports
map only exposes extensionless subpaths, so imports use
`use-sync-external-store/shim` and `/with-selector` (runtime supports
both).
will do a separte PR for changes which would require code changes so
it's easier to review , didn't upgrade any deps for `@uppy/aws-s3` since
we'll merge the rewrite so I think we should do that upgrade in the
rewrite branch before merging.
update : Dependency upgrades which required code changes were raised
separately
- #6309
- #6310
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
this fixes#6287 , another similar attempted fix which didn't got merged
: #5683
in #5683 we discussed a more longer term solution but IMO that would be
a breaking change as it would change the event contract
AI Disclaimer : AI Used
This fix is Manually Tested across **Chrome and Firefox**
all the dev deps upgraded excepts for these :
- `@types/cors: 2.8.6`
- `@types/jsonwebtoken: 8.3.7`
- `@types/morgan: 1.7.37`
- `@types/node: ^20.19.0`
- `nock: ^13.1.3`
upgrading these to their latest major either breaks the test suite or
requires us to do code changes on our end.
#6297
---------
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
exact copy of #6175
- I will point the uppy deps upgrade pr to this PR's branch
- no other changes needed in this branch as #6175 was reviewed and all
the comments were resolved
this should be the order of merge :
1. #6300
2. uppy deps upgrade ( yet to be raised )
3. merge this to main
4. merge biome changes #6244
@mifi let me know if you think otherwise.
---------
Co-authored-by: Mikael Finstad <finstaden@gmail.com>