414 Request-URL Too Large (Uploading with Vue JS)

Comments

3 comments

  • Avatar
    Michal Kuperman

    Hi Daniel,

    Looking at the logs it seems that the file wasn't included which resulted in this error: "Missing required parameter - file".

    Can you please verify that the file is included in the body of the POST request?

    Thanks,

    Michal

    0
    Comment actions Permalink
  • Avatar
    Daniel Egry

    yes it is included, and i could upload it with curl, I just can not seem to find any problems in my code... But there are always 2 options:

    - If i send it as a request parameter the URL is too large

    - If i send it in request body "I get Missing required parameter...File" error

    0
    Comment actions Permalink
  • Avatar
    Aleksandar Kostadinov

    Hi Daniel,

    Firstly, the request shouldn't be sent with query string parameters and the request method needs to be POST. These are the first things to ensure are always set correctly. If you are seeing an issue with this setup then this needs to be looked into.

    For example, I have created a working test JSFiddle for you that uses Axios and sends FormData to Cloudinary.
    https://jsfiddle.net/aleksandar_cloudinary/47Lghaoj/

    There are two parts to the JSFiddle. What I would recommend you do is to include that code (2 lines FormData and Axios call) in your project and also provide an unsigned upload preset value. The File parameter I have given is a Base64 Data URI to a valid 1x1 pixel image. The reason for this setup is to ensure you can successfully upload this file in your account using this approach within your project. Once you add your cloud_name, upload preset and run that part of your project you should see in the console a successful response and the 1x1px image in your account.

    Once that works for you, please remove this test code and add the code below it which are the same parameters from your example added in the same fashion as Form Data. You will need to wrap that code within your existing project inside your reader's on "load" event listener, but the core part would be the same. Then you should be able to test the upload again.

    May I please ask you to try this and let us know how it goes. If it doesn't work, please share an example public_id from the request so that we can use that to find the relevant logs on our side. We can then see what parameters were passed and why that may not have worked for you.

    0
    Comment actions Permalink

Please sign in to leave a comment.