Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image upload using react-admin

Tags:

react-admin

I am new to react-admin. I am using react-admin to upload the file. I have following the step mentioned below in tutorial.

But after I submit the request...I see http trace as follow. I see blob link instead of Base64 image payload.

{
    "pictures": {
        "rawFile": {
            "preview": "blob:http://127.0.0.1:3000/fedcd180-cdc4-44df-b8c9-5c7196788dc6"
        },
        "src": "blob:http://127.0.0.1:3000/fedcd180-cdc4-44df-b8c9-5c7196788dc6",
        "title": "Android_robot.png"
    }
}

Can someone please advice how to get base64 image payload instead of link?

like image 509
amit kumar Avatar asked Apr 18 '26 22:04

amit kumar


1 Answers

Check to see if you have this handler, most likely you did not change the name of the resource posts to your:

const addUploadCapabilities = requestHandler => (type, resource, params) => {
    if (type === 'UPDATE' && resource === 'posts') { 
like image 90
MaxAlex Avatar answered Apr 23 '26 01:04

MaxAlex