Answers for "js get fil path"

2

get file path

On Windows explorer :
Hold shift and right click on the file
Select "Copy file path to clipboard" (this may change with windows versions and languages)
Paste the content of your clipboard in a document.
Posted by: Guest on June-18-2021
1

how to use javascript to get full file path

const onChange = (event) => {
  const value = event.target.value;

  // this will return C:fakepathsomefile.ext
  console.log(value);

  const files = event.target.files;

  //this will return an ARRAY of File object
  console.log(files);
}

return (
 <input type="file" onChange={onChange} />
)
/* Found from Stack Overflow */
Posted by: Guest on October-08-2020

Browse Popular Code Answers by Language