The easy way is to put your uploaded files into a directory in
/priv/static then any requests to
http://yoursite.com/static/some/path/your_new_file.bin
Otherwise, if your files are small, you could just have a controller
return {output, FileContents, Headers}, where FileContents could be
the result of file:read_file/1
(
http://erldocs.com/17.0/kernel/file.html?i=0&search=file:read_file#read_file/1)
Ooootherwise, if your files are large, you can write a generator
function and return a streaming with with {stream, GeneratorFun, Acc}
(see
http://chicagoboss.org/api-controller.html)
Hope that helps,
-Jesse
> --
> You received this message because you are subscribed to the Google Groups
> "ChicagoBoss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
chicagoboss...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/chicagoboss.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/chicagoboss/658e5727-2a37-4e1a-8e31-e05e6c13b5b3%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 ||
sigma-star.com || @jessegumm