diff options
Diffstat (limited to 'src/site.clj')
| -rw-r--r-- | src/site.clj | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/site.clj b/src/site.clj index 3a8ecd3..c06b194 100644 --- a/src/site.clj +++ b/src/site.clj @@ -856,10 +856,13 @@ (or (is-file-too-big? f vip) (is-image-invalid? f))) -; TODO: + +; Upload notes: ; The webcam code doesn't feature an error handler, ; so all upload responses not equal to "OK" are considered ; errors. +; The upload code doesn't use jQuery.ajax, and doesn't JSON-eval +; responses. Therefore, return strings should not be JSON-encoded. (defn do-upload [session image room] (if-let [err (validate-upload-file (image :tempfile) (is-vip? session))] @@ -874,7 +877,7 @@ (dosync (add-message msg room)) (copy (:tempfile image) dest) - (resp-success "OK"))))) + [200 "OK"])))) (defn upload [session params] (let [room-key (params :room) |
