joni2back / angular-filemanager

JavaScript File Manager Material Design Folder Explorer Navigator Browser Manager in AngularJS with CSS3 Responsive (with FTP in PHP / Java / Node)
https://joni2back.github.io/angular-filemanager/
MIT License
1.76k stars 577 forks source link

"Invalid Path" error when uploading files to filemanager.py #308

Open iamwhitebox opened 7 years ago

iamwhitebox commented 7 years ago

Using python tornado server, files are listing correctly - but uploading returns an "Invalid Path" error, I can't figure it out. Anyone else seen this?

screen shot 2017-10-13 at 9 32 37 am
Cooya commented 6 years ago

I got the same problem (in Python 2.7+). The issue is that "/src/js/enties" should not start with a slash because os.path.join() acts weird when there is one part starting with a slash. For fix it, into the function upload(), I added:

destination = handler.get_body_argument('destination', default='/')[1:]

I created a pull request for that #340.