         (if ok
           (if (= response-type "base64")
             (if (params "save")
-              (save-file-and-get-url (rast/to-base64 result) (get-file-name params) ".base64")
-              (json-success (rast/to-base64 result)))
+              (save-file-and-get-url (rastr/to-base64 result) (get-file-name params) ".base64")
+              (json-success (rastr/to-base64 result)))
             (if (params "save")
               (save-file-and-get-url result (get-file-name params) ".png")
               (file-success result (get-file-name params) ".png")))

    (if (params-validator/valid-result? validation-result)
      (let [{ok :ok result :result} (to-png params)]
        (if ok
          (twitter/twitter request (rast/to-base64 result))
          (log/wrap-log-error json-error result request :processing)))
      (log/wrap-log-error json-error (params-validator/get-error-message validation-result) request :bad_params))))


        (if ok
          (if (= response-type "base64")
            (if (params "save")
              (save-file-and-get-url (rastr/to-base64 result) (get-file-name params) ".base64")
              (json-success (rastr/to-base64 result)))
            (if (params "save")
              (save-file-and-get-url result (get-file-name params) ".pdf")
              (file-success result (get-file-name params) ".pdf")))
