Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Router's fetcher fails to upload some images on Safari #12960

Open
jmho opened this issue Feb 5, 2025 · 0 comments
Open

React Router's fetcher fails to upload some images on Safari #12960

jmho opened this issue Feb 5, 2025 · 0 comments
Labels

Comments

@jmho
Copy link

jmho commented Feb 5, 2025

I'm using React Router as a...

framework

Reproduction

  1. Open up the following StackBlitz in Safari and Chrome
  2. Download the following zip containing png images here
  3. Extract the untitled folder from the zip file.
  4. Upload any of the two images to the stackblitz instance opened in chrome and click submit.
  5. Upload the same image as in step 4 to the stackblitz instance opened in safari and click submit.

Additional note:

  • These .png images were created using the MacOS Snipping tool.

System Info

Stack Blitz
  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @react-router/dev: * => 7.1.5 
    @react-router/node: * => 7.1.5 
    @react-router/serve: * => 7.1.5 
    react-router: * => 7.1.5 
    vite: ^6.0.11 => 6.1.0 

Local
  System:
    OS: macOS 15.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 137.61 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
    pnpm: 9.12.3 - ~/.nvm/versions/node/v20.11.1/bin/pnpm
    bun: 1.1.0 - ~/.bun/bin/bun
  Browsers:
    Chrome: 132.0.6834.160
    Safari: 18.3
  npmPackages:
    @react-router/dev: ^7.1.4 => 7.1.4 
    @react-router/node: ^7.1.4 => 7.1.4 
    @react-router/serve: ^7.1.4 => 7.1.4 
    react-router: ^7.1.4 => 7.1.4 
    vite: ^5.4.11 => 5.4.14

Used Package Manager

npm

Expected Behavior

I expect both Safari and Chrome to have the same behavior when uploading images. The same behavior is defined as is_file rendering as true on the web page and the console.log(...) that fires on form submissions to output the same object.

Actual Behavior

Chrome successfully renders is_file as True and outputs the expected File object on fetcher submission.

Safari renders is_file as False and outputs an empty string on console.log(...) for fetcher submission.

Image of behavior attached:

Image

@jmho jmho added the bug label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant