qjon / angular2-filemanager

MIT License
15 stars 9 forks source link

Upload files #1

Closed Surakarus closed 7 years ago

Surakarus commented 7 years ago

I tried to figure out how upload works, but failed. Could you please help me?

Surakarus commented 7 years ago

I figured it out, it's because of fsevents compatibility.

Surakarus commented 7 years ago

But i still want to know how to upload files.

Surakarus commented 7 years ago

I receive this error Error: Error in ./Toolbar class Toolbar - inline template:7:6 caused by: item is undefined

qjon commented 7 years ago

Hi, did you look at example? Is that demo works? Could you send me more details about your problem, because I can not reproduce this issue?

Surakarus commented 7 years ago

Hello! I got this error when upload button is pressed in demo. Also I can't understand how user should select files to upload. Is it drag&drop or what? What details do you need? Thank you in advance

qjon commented 7 years ago

Oh, it's looks strange (in my clear build it works). Pressing upload button in toolbar should open system dialog and let you choose files from your system (standard browser window). Currently there is no D&D functionality but I can fink about it in the future. Hmm... Let's check if we do the same steps:

  1. Clone repo
  2. npm i
  3. In first terminal: npm run backend
  4. In second terminal: npm start
  5. Open browser: http://localhost:4200

This steps allows me to create directory and upload files. Did you do the same steps?

Surakarus commented 7 years ago

I usually use Mozilla Firefox as default browser, and dialog window doesn't appears in it. But if I open localhost:4200 in Chrome, upload works perfectly. And yes, I followed exactly these steps.

qjon commented 7 years ago

OK. So this is some issue in FF, I will check it. Thanks for feedback.

Surakarus commented 7 years ago

Sorry for not mentioning the fact: This error appears if I manually call fileManagerUploader.uploader.onUpload(). I know that this is wrong, but I was desperate. Without this mess there is only [WDS] Disconnected! warning. And dialog window doesn't show. Sorry again.

Surakarus commented 7 years ago

I solved this problem using RMD's answer http://stackoverflow.com/questions/39132451/can-i-use-ng2-file-upload-with-button-instead-of-a-file-input Hope it helps someone