juanferman
Programmer
Hey Guys,
I'm having a hard time trying to get the file name from a Mac Path like C:\\foo\folder\dork.txt
I have a file upload button that onchange event takes the path and extracts the file name. Then it puts the file name in a free text filed in order to allow the user to tell what file name he wants before upload the file or if he wants just to leave the original name.
Sounds easy, actually works pretty good on PC but when trying to implement it on Mac does not work.
On PC I'm getting the value of the file upload button and splitting the path by "/". But on Mac the path has already a "\".
Any help will be really appreciate.
Thanks
===================
:
Juan F. Sarria
I'm having a hard time trying to get the file name from a Mac Path like C:\\foo\folder\dork.txt
I have a file upload button that onchange event takes the path and extracts the file name. Then it puts the file name in a free text filed in order to allow the user to tell what file name he wants before upload the file or if he wants just to leave the original name.
Sounds easy, actually works pretty good on PC but when trying to implement it on Mac does not work.
On PC I'm getting the value of the file upload button and splitting the path by "/". But on Mac the path has already a "\".
Any help will be really appreciate.
Thanks
===================
: