Hello everyone,
does anybody know how to send the new created file over the web?
I have one script that creates new file. It works fine, but now I need to run this script on the web-server and download generated file via browser.
Thanks for your help and time,
Alex
Send the new file over HTTP (server part)
-
- Posts: 166
- Joined: Sun Nov 28, 2010 4:21 pm
Re: Send the new file over HTTP (server part)
Your English leaves something to be desired, but:
A library for making http requests (which would let you upload files) is http://weitz.de/drakma/
A library for making web-servers (that will handle requests for files from web-browsers) is http://weitz.de/hunchentoot/
Both are available through http://quicklisp.org/
A library for making http requests (which would let you upload files) is http://weitz.de/drakma/
A library for making web-servers (that will handle requests for files from web-browsers) is http://weitz.de/hunchentoot/
Both are available through http://quicklisp.org/
Re: Send the new file over HTTP (server part)
I don't need to make http requests or web-servers...
I just want to save a file (on client side, via browser) that will be created on the server side (standard output).
The question is how to send the output-stream (in my case it's a file) to standard-output?
I just want to save a file (on client side, via browser) that will be created on the server side (standard output).
The question is how to send the output-stream (in my case it's a file) to standard-output?
Re: Send the new file over HTTP (server part)
The answer is
But now I have another question: what's wrong with this code?
After removing (ql:quickload "buildnode-excel") it works...
Code: Select all
(format t "Content-Type:application/vnd.ms-excel~%")
(format t "Content-Disposition:attachment;filename=file.xls~%~%")
(princ "Test. Ok!")
Code: Select all
#!/usr/bin/sbcl --script
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(ql:quickload "buildnode-excel")
(format t "Content-Type:application/vnd.ms-excel~%")
(format t "Content-Disposition:attachment;filename=file.xls~%~%")
(princ "Test. Ok!")