This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; original implementation | |
| ;; hunchentoot;utils.lisp | |
| ;; | |
| (let ((counter 0)) | |
| (declare (ignorable counter)) | |
| (defun make-tmp-file-name (&optional (prefix "hunchentoot")) | |
| "Generates a unique name for a temporary file. This function is | |
| called from the RFC2388 library when a file is uploaded." | |
| (let ((tmp-file-name | |
| #+:allegro |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun make-upload-filename () | |
| (etypecase *upload-filename-generator* | |
| ;; the old behaviour. | |
| (null t) | |
| ;; the new behaviour. | |
| ((or symbol function) | |
| (lambda (&rest args) | |
| (let ((filename (apply *upload-filename-generator* args))) | |
| (when *file-upload-hook* | |
| (funcall *file-upload-hook* filename)) |