     [:input {:id "profile-picture-upload"
              :type "file"
              :name "file"
-             :on-change #(send-file pictures-atom)
+             :on-change #(send-file pictures-atom profile-picture-atom)
              :accept "image/*"}]]])
 
 (def empty-field {:field "" :value ""})

      "/obpv1/file/upload"
      {:body    form-data
       :handler (fn [{:keys [status message reason data]} response]
                  (if (= status "success")
                    (reset! files-atom (conj @files-atom data)))
                  (m/modal! (file/upload-modal status message reason)))})))

(defn gallery-element [picture-data profile-picture-atom]

                 :fields             profile-fields}
       :handler (fn [] (navigate-to (str "/user/profile/" (:user_id @state))))})))

(defn send-file [files-atom profile-picture-atom]
  (let [file (-> (.querySelector js/document "#profile-picture-upload")
                 .-files
                 (.item 0))
