Reputation: 5217
file1.gif
is 637.8 kB
. A file2.gif
is created but stops at 36 bytes
.
(require '[clojure.java.io :as io])
(io/copy "/var/project-dir/uploads/file1.gif"
(io/file "/var/project-dir/uploads/file2.gif"))
Any idea what could be going on?
Upvotes: 1
Views: 73
Reputation: 20194
Your code inserts the string "/var/project-dir/uploads/file1.gif" into the destination file. You need to provide the actual source of the data:
(io/copy (io/file "/var/project-dir/uploads/file1.gif")
(io/file "/var/project-dir/uploads/file2.gif"))
Upvotes: 3