conusio / conus

Other
0 stars 0 forks source link

when running prod (via java -jar), uploaded images don't show #42

Closed zlrth closed 7 years ago

zlrth commented 7 years ago
lein repl
(start)

works fine in all cases. with

java -jar ....

you can upload pictures, then view them with lein repl (start), but you can't see them from java -jar. this behavior persists across restarts of all kinds i've tried. the generated HTML looks fine. the direct image link 404s for the images uploaded via java -jar.... the permissions are the same for all images in resources/public/images.

whuuh?

zlrth commented 7 years ago

fixed. have to run

sudo -E java -cp target/uberjar/conus.jar:resources conus.core &

java -jar ... runs a jar that's not aware of the files not on the classpath. specifying :resources puts resources on the classpath.