microsoft / microsoft/Web-Dev-For-Beginners

**To Reproduce** Steps to reproduce the behavior: 1. Go to **Upload Page** 2. Click on **Select File** 3. Choose any .jpg image 4. The app crashes and displays the error **Expected behavior** The image should upload successfully and show a preview instead of crashing. **Screenshots** ![screenshot](link-to-screenshot.png) **Desktop (please complete the following information):**

Open
#1,518 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

no-issue-activity
Dominant language
JavaScript
Stars
96.7k
Forks
15.9k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.
Describe the bug
When trying to upload an image, the application crashes with an error message: "Unexpected token in JSON".

To Reproduce
Steps to reproduce the behavior:

  1. Go to Upload Page
  2. Click on Select File
  3. Choose any .jpg image
  4. The app crashes and displays the error

Expected behavior
The image should upload successfully and show a preview instead of crashing.

Screenshots
screenshot

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome
  • Version: 117

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S22
  • OS: Android 13
  • Browser: Chrome Mobile
  • Version: 117

Additional context
This issue only happens with .jpg files larger than 5 MB. .png uploads work fine.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Upload Page and reproduce the failure with a .jpg larger than 5 MB in Chrome; no source file or test is identified in the issue. Done means the image uploads and shows a preview without the “Unexpected token in JSON” error, while existing .png uploads continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.