   DateTime
   (to-json [t, ^JsonGenerator jg] (.writeString jg (str t))))
 
-(defn- translate-file-from-stream [reader, dataset, mapping, validity, json-filename-fn]
+(defn- translate-file-from-stream [reader, dataset, mapping, validity, original-filename]
   "Read from reader, xml2json translate the content"
   (let [compressed-files (volatile! [])]
     (runner/translate

    {:json-files (map #(config/create-url (str "api/get/" (.getName %))) zipped-files)}))

(defn stats-on-callback [callback-chan request stats]
  (when (:callback request)
    (go (>! callback-chan [(:callback request) stats]))))


      validity
      reader
      #(doseq [file %]
         (let [json-filename ^String (fs/json-filename original-filename)
               compressed-file (fs/create-target-file json-filename)]
           (log/debug "Saving result as" json-filename)
           (with-open [output-stream (io/output-stream compressed-file)
                       zip (ZipOutputStream. output-stream)]
             (.putNextEntry zip (ZipEntry. json-filename))
