Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Image upload failed with Rich Editor in 2.8

ligyxyligyxy New
edited February 9 in Vanilla 2.8 Help

Tried to upload image or attachment through new Rich Editor. It returns "Request failed with status code 400" while I can see the file in uploads folder.


I have tried update the folder permissions but it doesn't help.

Comments

  • By checking the network, looks like the POST requests to /api/v2/media failed, and it got

    {

      "message": "Validation Failed",

      "status": 400,

      "errors": [

        {

          "field": "storageMethod",

          "code": "ValidateRequired",

          "status": 400,

          "message": "ValidateRequired."

        }

      ]

    }

  • Since it mentions storageMethod is required, I eventually fixed it by giving GDN_Media.StorageMethod a default value 'local' in MySQL. But should this be in upgrade process?

  • LincLinc Director of Development Detroit Vanilla Staff

    Did you run utility/update after you updated your files?

  • LincLinc Director of Development Detroit Vanilla Staff
    edited February 9

    I'm looking at our commit history, and we removed the column `GDN_Media.StorageMethod` in Dec 2015. I removed the column from my localhost (which predates the column removal, and did have the default set to `local`) and am able to use the image drag-and-drop upload without issue.

    Don't have any idea why that happened, sorry.

  • I did run utility/update before seeing this issue. I thought it handles the database migration but looks like GDN_Media.StorageMethod is somehow not covered.

  • LincLinc Director of Development Detroit Vanilla Staff

    As I said, it wouldn't be covered because it's no longer used and was removed from the table structure some years ago.

Sign In or Register to comment.