matthewoh93 ASP.NET

Friday, 17 September 2021

Axios POST not working for image upload

I found that this guy had also $_FILES['image'][tmp_name] empty issue:

https://stackoverflow.com/questions/62604318/files-is-empty-when-sending-a-post-request-using-axios-in-reactjs

In my case, it was 2MB upload_max_filesize in php.ini. Please see PHP - empty $_POST and $_FILES - when uploading larger files I pulled out my hair for 2 hours. Nothing wrong with Axios. I didn't need to specify headers.















Posted by Matthew Oh at 13:48
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2022 (26)
    • ►  August (1)
    • ►  July (1)
    • ►  June (4)
    • ►  May (19)
    • ►  April (1)
  • ▼  2021 (4)
    • ▼  September (2)
      • Axios POST not working for image upload
      • Php to save image in s3 bucket
    • ►  August (2)
  • ►  2020 (33)
    • ►  July (3)
    • ►  June (1)
    • ►  May (6)
    • ►  April (3)
    • ►  March (18)
    • ►  February (2)
  • ►  2019 (2)
    • ►  October (2)
  • ►  2015 (14)
    • ►  December (1)
    • ►  November (3)
    • ►  October (7)
    • ►  September (3)
  • ►  2014 (11)
    • ►  October (1)
    • ►  April (3)
    • ►  February (3)
    • ►  January (4)
  • ►  2013 (9)
    • ►  December (1)
    • ►  November (3)
    • ►  October (1)
    • ►  September (1)
    • ►  August (2)
    • ►  March (1)
  • ►  2012 (6)
    • ►  July (1)
    • ►  June (1)
    • ►  May (3)
    • ►  April (1)
Picture Window theme. Powered by Blogger.