Comments (3)
No problem @thiru. You caught me while I was submitting an issue so I thought I'd help! :)
Can't believe I forgot about pathnames though because the static middleware basically works by returning pathnames that match a regexp. My solution would be overkill for your use case and better for something like a shoutcast/icecast music streamer.
from ningle.
I'm not too sure but this might be the relevant documentation, look for the Delayed Response and Streaming Body topic under https://github.com/fukamachi/lack . I forgot the syntax but I do remember doing something in ningle with this.
At least I think that's one way by using that after setting the *RESPONSE* to content-type application/octet-stream.
(setf (lack.response:response-headers *response*)
(append (lack.response:response-headers *response*)
(list :content-type "application/octect-stream")))
I'm not sure what you want is a good idea though for security reasons since I'm under the impression most web dev likes to keep what's "public" separate from the "private".
from ningle.
Thanks for the quick response @resttime, much appreciated!
I noticed the Lack readme says it's possible to return a pathname as the response body. This seems to work and I can point it at any arbitrary path in the file-system.
I know this sounds like a crazy thing to do but the nature of the app I'm building is to serve as a sort of web-based file browser.
from ningle.
Related Issues (20)
- clack/lack dependency HOT 3
- Readme is confusing with "authorize" HOT 2
- how to use cl-who or djula with ningle HOT 2
- POST body-parameters are being lost such as the filenames when uploading files HOT 1
- Params list is truncated HOT 1
- Response is broken HOT 1
- Body parameters containing an object with an array only keeps the first item. HOT 1
- static-vectors dependency not supporting 64-bit windows
- 'ningle.app:<app> is not of type clack.handler::handler HOT 2
- Is ningle a fork of caveman? HOT 2
- Documentation after package-inferred-system commit may need update HOT 1
- JSON bodies not properly encapsulated HOT 3
- Is there a way to test routing without having to go through the server?
- Clackup with ningle throws error HOT 2
- Setting up routes for static content HOT 8
- sbcl-ningle: permission denied HOT 1
- Upload file size limit HOT 4
- Redirect function
- ningle middlewares and exposing lack's environment HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ningle.