;; Copyright © 2026 Genworks International
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as
;; published by the Free Software Foundation, either version 3 of the
;; License, or (at your option) any later version.  Distributed WITHOUT
;; ANY WARRANTY; see <https://www.gnu.org/licenses/agpl-3.0.html>.

(in-package :gwl-user)

(define-object file-upload-1 (base-html-page)
  :computed-slots
  ((uploaded-path "" :settable)
   (body
    (with-lhtml-string () (str (the development-links))
      (str
       (with-form-string (:enctype "multipart/form-data")
         (:table (:tr (:td (:input :type "file" :name :uploaded-path :value (the uploaded-path))))
           (:tr (:td (:input :type "submit" :name "upload" :value "Upload"))
                (:td (str (the uploaded-path)))))))))))

(publish-gwl-app "/file-upload-1" "gwl-user::file-upload-1")
