Skip to content

JSON.parse error when uploading media files #243

Open
@kam535

Description

@kam535

Summary:
Several students and I encountered an error when trying to upload media files:

On Chrome:
There was an error saving the file: SyntaxError: Unexpected token '<', is not valid JSON

On Firefox and Safari:
There was an error saving the file: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

I tried adding a test chunk of JSON to the custom JSON section, which is then flagged as the error when I go to debug. Leaving the custom JSON section completely blank still raises the same error.

To reproduce:

  1. Log in and open any book
  2. Upload media through either the Content section of the book Dashboard or through the Upload button in the page editor
  3. Add title, description for media and select file
  4. Click Upload

Expected result:
A selected media file with a specified title and description being added to the Content of the book. A green "succesfully uploaded" banner appearing at the bottom of the screen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions