noir-clojure / lib-noir

A set of libraries for ring apps, including stateful sessions.
Eclipse Public License 1.0
483 stars 47 forks source link

upload-file not working jar #95

Closed ccfontes closed 10 years ago

ccfontes commented 10 years ago

upload-file is not working in jar created with lein uberjar and ran with java -jar proj.jar it works using lein run though

java.io.FileNotFoundException: <system-path-to-file> (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:84)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at clojure.lang.Reflector.invokeConstructor(Reflector.java:180)
    at noir.io$upload_file$fn__2979.invoke(io.clj:28)
...
yogthos commented 10 years ago

A jar is readonly and you can't write into it, you have to provide a filesystem location for the files.

ccfontes commented 10 years ago

oh my.. thanks!