title: Closing a served file in clojure/webnoir
body: <p>I've got the following function in webnoir that serves up an image from disk.</p>
  
  <pre><code>(defpage [:get "/GetPhoto"] {:keys [photoName]}
           (def file (io/input-stream  (str photoName ".jpg")))
           (resp/set-headers {"Content-Type" "image/jpeg"} file))
  </code></pre>
  
  <p>I assume I should close the file, but when I add <code>(.close file)</code> to the end of the function, I get an error <code>java.io.IOException: Stream closed</code> when accessing the URL.  What's the right way to handle this?</p>