question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Where is the file data during request to server?

See original GitHub issue

Good day guys,

I have a summary of my concern below

const EDITOR_JS_TOOLS = {
    image: {
        class: Image,
        config: {
            endpoints: {
                byFile: 'http://localhost:3001/api/uploads'
            },
            field: 'image',
            types: 'image/*'
        }
    }
}

const CommentEditor = () => {
    return <EditorJs tools={EDITOR_JS_TOOLS} />
}

When my react sends request to

router.post('/', async (req, res) => {
//when client use this endpoint, console.log can display a message
})

but where is the data? I look it to req.body but empty

Thank you.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
avillarubiacommented, Feb 18, 2020
1reaction
Jungwoo-Ancommented, Feb 18, 2020

@avillarubia Are you talking about static file upload? If so, I don’t have plans. 😥

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developer: Retrieving File Data - SugarSync
To retrieve file data, an application submits an HTTP GET request to the file data resource that represents the data for the file....
Read more >
Fetching data from the server - Learn web development | MDN
This article shows how to start working with Fetch to fetch data from the server.
Read more >
How does HTTP file upload work? - Stack Overflow
In a request, this is where user-entered data or uploaded files are sent to the server. http://www.tutorialspoint.com/http/http_messages.htm.
Read more >
Sending a HTTP request to the server and saving the ...
Sending a HTTP request to the server and saving the response information to a local file - Cloud - 8.0. HTTP. Version: Cloud:...
Read more >
How to get data directly from request.form.file[0] instead of ...
I work on c# 7 I face issue I can't get data from file Request.form.file[0] directly. it must copying to server to get...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found