jalik / meteor-jalik-ufs

Upload File System for Meteor **DISCONTINUED**
MIT License
100 stars 29 forks source link

Upload not working using --port=host:port #126

Closed atd closed 6 years ago

atd commented 6 years ago

meteor run --help shows

Specify as --port=host:port to bind to a specific interface.

However, using meteor run --port 10.0.13.148:3000 to run the server breaks uploads. No error is shown in console neither the onError callback

export ROOT_URL=http://10.0.13.148:3000 && meteor run works

jalik commented 6 years ago

@atd as you said, export ROOT_URL=http://10.0.13.148:3000 works, because it's the way you should configure your app root URL, its written in the Meteor documentation.

I guess --port only defines on which port to listen, but does not auto defines the value of ROOT_URL.

atd commented 6 years ago

So maybe I should rename the issue:

"jalik/ufs does not support BIND_IP in production and --port=host:port in development"?

https://docs.meteor.com/environment-variables.html#BIND-IP

:wink:

jalik commented 6 years ago

@atd I've tested the following commands with the UFS example project (https://github.com/jalik/ufs-example) :

meteor run
meteor run --port 4000
meteor run --port 192.168.3.1:4000

All executions went normally without the need to define ROOT_URL and I could upload files without any error, I guess there is something wrong with your setup. You should checkout the ufs-example repository and compare it to your setup.

I cannot help you based on "... breaks uploads", moreover on my side it's working fine. You said that using ROOT_URL you setup works fine, so it's related to how your ROOT_URL is defined, and this env var is used by Meteor in Meteor.absoluteUrl().

Note : UploadFS is relying on the official Meteor.absoluteUrl() method to communicate with upload endpoints (nothing tricky so).

atd commented 6 years ago

I am afraid I am not able to reproduce it anymore

Thank you @jalik for the detailed explanation and this awesome package

jalik commented 6 years ago

@atd I am glad I could help you in any way. Feel free to create new issues to help fixing / improving the package, you are also welcome for other contributions like sending pull requests. Happy coding.