Skip to main content

Upload Image Fail: [Error: ENAMETOOLONG: name too long,

Comments

2 comments

  • Official comment
    Danny Valentine

    Hey. Thanks for getting in touch.

    I'm afraid we don't support directly uploading svg files in this way, however, if you base64 encode the SVG, the upload should be successful.

    To test, you can base64 encode everything from <svg> to </svg>, set your data variable to "data:image/svg+xml;base64," + base64_encoded_svg, and then upload with resource_type:'image' as an optional parameter.

    I put together a quick example here on repl.it that you can fork and test for yourself.

    If you have any questions, feel free to reply here or raise a support ticket with us.

    Thanks,
    -Danny

     

  • linleiqin

    Can not upload this svg data,

    call back :[Error: ENAMETOOLONG: name too long, open.....

    Please HELP!!

    0

Post is closed for comments.