     (or (image? field)
         (video? field)) (let [image (:download_url answer)
                               thumb (or (:small_download_url answer) image)
+                              media-upload-fail-hlp-url
+                              urls/media-upload-fail-during-submission-help
+                              media-upload-fail-translation-txt
+                              (translate
+                               :table-data-view-page/media-upload-fail-err-msg)
                               fname (last-url-param (:filename answer))]
                           (cond
-                            (string? answer) answer
+                            (and (string? answer)
+                                 (not= answer "null") (nil? thumb))
+                            (media-files-upload-error-component
+                             answer
+                             :hlp-url
+                             media-upload-fail-hlp-url
+                             :translation-txt
+                             media-upload-fail-translation-txt
+                             :record-modal?
+                             record-modal?)
+                            (= answer "null") answer
                             compact? (format "<a href='%s' target='_blank'>
                                       <i class='fa fa-external-link'></i>
                                       %s </a>" image fname)
-                            (nil? thumb) answer
                             :else [:a {:href image :target "_blank"}
                                    (if (image? field)
                                      [:img {:width "80px" :src thumb}]

                            "instanceID"
                            "__version__"
                            "_duration"
                            "_submitted_by"}
                          field)
      (field-type-in-set? #{"deviceid"
                            "end"

(ns hatti.ona.forms
  (:require [chimera.js-interop :refer [format]]
            [chimera.urls :refer [last-url-param]]
            [ona.utils.urls :as urls]
            [ona.utils.i18n :refer [translate]]
            [chimera.date :as chimera-date]
            [cljs.pprint :refer [cl-format]]
            [clojure.string :as string]
            [hatti.constants :refer [_submission_time
                                     _submitted_by
                                     _last_edited
                                     _id
                                     _media_all_received]]))

;; CONSTANTS
(def currency-regex #"£|$")
