Cannot refer to content in the public folder from HTML #196

giacecco opened this Issue Jun 22, 2012 · 9 comments


None yet

5 participants

giacecco commented Jun 22, 2012 edited

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:

/foo.jpg (like in the todo list example)

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?



giacecco commented Jul 4, 2012

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.

giacecco commented Jul 9, 2012

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.

dru commented Sep 3, 2012

If your path has spaces in it (e.g. you external volume name is "External HD" of project name have spaces) then static middleware ( fails to parse fullpath

for example
"/Users/dru/git/svitto test/.meteor/local/build/static/images/logo.png"
parsed as

glasser commented Sep 5, 2012

dru, is this a bug in static? Should it be reported to that project?

avital commented Sep 17, 2012

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)

@avital avital closed this Sep 17, 2012
@avital avital reopened this Sep 18, 2012
avital commented Sep 18, 2012

We should try to find a way to submit a patch if necessary and/or work around it.

@avital avital was assigned Sep 18, 2012
glasser commented Sep 25, 2012

I tried to reproduce @dru 's bug but couldn't. Closing.

@glasser glasser closed this Sep 25, 2012
@avital avital was unassigned by helfer May 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment