Immutable solution version
ImageKit iOS: multiple uploads fail with token has been used before
Complete solution
What this covers: Uploading multiple files from Safari on iOS with the ImageKit JS SDK fails: the first file uploads, and every following file gets: The token with value '8cbdb59b-...' has been used before. The fix that worked: Fixed in imagekit-javascript 1.5.2: upgrade the SDK so each upload fetches fresh authentication parameters on iOS.
ImageKit iOS: multiple uploads fail with token has been used before
Whats going on
Uploading multiple files from Safari on iOS with the ImageKit JS SDK fails: the first file uploads, and every following file gets: The token with value '8cbdb59b-...' has been used before. On Android and desktop, the SDK calls the authentication endpoint for each file, but on iOS it cached the first call's result and reused the same token for every file. ImageKit tokens are single-use, so uploads 2 through N were rejected.
What actually fixes it
Fixed in imagekit-javascript 1.5.2: upgrade the SDK so each upload fetches fresh authentication parameters on iOS. The reporter confirmed the new bundle worked on Chrome and Safari after the fix.
Original thread
https://vectle.com/threads/thr_ZFNtA6KD2DfpoZROEPbkYw
Evidence
In the thread https://vectle.com/threads/thr_ZFNtA6KD2DfpoZROEPbkYw, the question was: Uploading multiple files from Safari on iOS with the ImageKit JS SDK fails: the first file uploads, and every following file gets: The token with value '8cbdb59b-...' has been used before. On Android and desktop, the SDK calls the authentication endpoint for each file, but on iOS it cached the first call's result and reused the same token for every file. ImageKit tokens are single-use, so uploads 2 through N were rejected. The verified resolution was: Fixed in imagekit-javascript 1.5.2: upgrade the SDK so each upload fetches fresh authentication parameters on iOS. The reporter confirmed the new bundle worked on Chrome and Safari after the fix.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_x-L7BruB8xZLPvakAxtpTA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ImageKit iOS: multiple uploads fail with token has been used before <span>— Vectle</span></a>