Revision: 3870 Author: hans URL: http://bknr.net/trac/changeset/3870
discard path information of uploaded file, hoping that the rest is a parsable pathname.
U trunk/bknr/web/src/web/web-utils.lisp
Modified: trunk/bknr/web/src/web/web-utils.lisp =================================================================== --- trunk/bknr/web/src/web/web-utils.lisp 2008-09-09 15:50:25 UTC (rev 3869) +++ trunk/bknr/web/src/web/web-utils.lisp 2008-09-09 15:57:45 UTC (rev 3870) @@ -26,8 +26,8 @@ (setf (aux-request-value 'uploaded-files) (let ((uploads (remove-if-not #'listp (post-parameters*) :key #'cdr)) retval) (dolist (upload-info uploads) - (destructuring-bind (name pathname original-filename content-type) upload-info - (push (make-upload :name name :pathname pathname :original-filename original-filename + (destructuring-bind (name pathname original-pathname content-type) upload-info + (push (make-upload :name name :pathname pathname :original-filename (cl-ppcre:regex-replace "^.*[\\/]" original-pathname "") :content-type content-type) retval))) (nreverse retval)))) (aux-request-value 'uploaded-files))