Skip to main content

Why posting the request directly returns a invalid argument error but saving the request to the filesystem first and then posting it doesn't?


1 comment

  • Thomas Gurung

    Hi Duta,

    Thank you for reaching out. 

    In your first code snippet you are not extracting the temporary file path so try again with this:

    const file= req.files.image.path

    When you just request `req.files.image`, you get the json response with the details of the file and uploading that results in `ERR_INVALID_ARG_TYPE`.

    Please let me know if you have any other questions or queries.

    Kind Regards,



Post is closed for comments.