New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot refer to content in the public folder from HTML #196
Comments
Still no progress with this. I have posted the issue also on Stack Overflow here, with step by step instructions to reproduce it from a vanilla meteor project. |
I'm experiencing the same problem but with my font files. It was working properly in my iMac where I started the project, then I moved the files to my MacBook Pro and it's not serving the files properly. Please let me know if there's anything I can do to help solve this issue. This is the error that I'm getting from the developer tools: "Resource interpreted as Font but transferred with MIME type text/html: "http://localhost:3000/css/fonts/Chunkfive-webfont.woff"." |
Just found out what the problem was. It was totally my fault. The path to the file was wrong, it was /css/fonts/Chunkfive-webfont.woff instead of /fonts/Chunkfive-webfont.woff. Still I think the server should return a 404 response, instead of a 200. Everything works fine now though. |
Thanks Jorge. For everybody: this conversation is still developing on Stack Overflow, too. So far I have demonstrated that the same application works correctly on another Mac, which would apparently relate the issue to some strange web server issue in Meteor that depends on the host's configuration. |
If your path has spaces in it (e.g. you external volume name is "External HD" of project name have spaces) then static middleware (https://github.com/senchalabs/connect/blob/master/lib/middleware/static.js#L56) fails to parse fullpath for example |
dru, is this a bug in static? Should it be reported to that project? |
I think @glasser is suggesting that this is a bug in connect. I am closing this (if anything, the real bug is that spaces in static asset filenames aren't supported) |
We should try to find a way to submit a patch if necessary and/or work around it. |
I tried to reproduce @dru 's bug but couldn't. Closing. |
I know this sounds stupid but there is no way I can reference content in the public folder, e.g. images, from the main HTML file in a Meteor application. I have tried all combinations I can imagine:
and none works, nor I can find any examples in the documentation of what I am supposed to do. Of course foo.jpg exists.
The docs also say: "(...) Meteor server will serve any files under the public directory, just like in a Rails or Django project", so I've tried using Djiango's {{ STATIC_URL }}, but of course it does not work, too. What am I missing?
Thanks,
G.
The text was updated successfully, but these errors were encountered: