Hi Alex,

> Instead of the alerts, you could also put a +TextField onto the original
> form to display proper messages,

ok, now I have the script below but the question is how do I get hold of
the uploaded files, those that were dropped?  Also, it seems to be
uploading only one file even if I drop 2 files onto the "Uploaded"

Thank you,



#!/home/thlavaty/picoLisp-3.0.4/bin/picolisp /home/thlavaty/picoLisp-3.0.4/lib.l

(load "@lib/misc.l")

(allowed () "@start" "@stop")

(load "@lib/http.l" "@lib/xhtml.l" "@lib/form.l")

(de *Dir . "data/")
(de *Port0 . 4245)

(de start ()
   (setq *Url "@start")
      (html 0 "Upload" NIL NIL
         (<div> '(id . main)
            (<h2> NIL "Upload File")
            (<p> NIL (<href> "Back" (pack "http://"; *Host ":" *Port0)))
            (form NIL
               (<p> NIL
                  (gui 'line '(+Able +TextField) "") )
               (gui '(+UpField))
               (gui '(+Drop +Button) '(field -1) "Upload"
                  '(let F (val> (field -1))
                      (set> (: home line)
                         (if (and F (call 'mv (tmp F) *Dir))
                            (pack "'" F "' successfully uploaded")
                            "Nothing uploaded" ) ) ) ) ) ) ) ) )

(call 'mkdir '-p *Dir)
(server *Port0 "@start")
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to