Skip to content

Multi-extension validation failure should show a helpful validation message #1475

@br0p0p

Description

@br0p0p

Describe the bug
When uploading an image with a filename like Screen Shot 2019-05-22 at 3.54.06 PM.png, the request fails with status 422 and response {"file":["The file must only have a single file extension."]}

Steps To Reproduce
Steps to reproduce the behavior:

  1. Create a new page or edit an existing page.
  2. Click the "Insert an image" button.
  3. Browse to a file named something like Screen Shot 2019-05-22 at 3.54.06 PM.png or something with periods before the extension.

Expected behavior
The image should be uploaded and I should be able to select it from the image grid on the left.

Screenshots
It looks like the upload completes but it never shows up in the group of images to the left:
Screen Shot 2019-05-30 at 11 32 22 AM

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.26.1
  • PHP Version: 7.2.3
  • Hosting Method (Nginx/Apache/Docker): IIS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions