Quantcast
Channel: Formidable returns TypeError, ERR_INVALID_ARG_TYPE: The "path" argument is undefined - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by Sam Dean for Formidable returns TypeError, ERR_INVALID_ARG_TYPE: The "path" argument is undefined

$
0
0

Simply change

var oldPath = files.profilePic.path;

to

var oldPath = files.profilePic.filepath;

Also make sure that you create the "uploads" folder as the code doesn't create it and it will fail without it.

EDIT: A side note is that if your environment is just spitting out [object object] when you console log an object, then probably get a new environment (visual studio code is good) that gives useful information.


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>