Home > Net >  How to save blob image in server folder in ASP.NET MVC
How to save blob image in server folder in ASP.NET MVC

Time:12-12

I'm trying to handle POST call using react-admin's <ImageInput /> component. When I call POST, the below Payload send to my ASP.NET MVC Server.

{
    "event_title": "test",
    "event_date": "1111-11-11",
    "event_description": "test",
    "event_poster": {
        "rawFile": {
            "path": "test.jpg"
        },
        "event_poster": "blob:http://localhost:3000/d536e2d0-21ee-40c1-8a1a-34c5d725015c",
        "title": "test.jpg"
    }
}

The problem is with 'event_poster' attribute. I don't know how to get the Image from this blob URL and save it in my server folder.

CodePudding user response:

The original React-Admin does not send image data, a Data Provider refinement is required: https://marmelab.com/react-admin/DataProviders.html#extending-a-data-provider-example-of-file-upload

  • Related