YtoTech / latex-on-http

Compiles Latex documents through an HTTP API
https://latex.ytotech.com
GNU Affero General Public License v3.0
31 stars 5 forks source link

Support short-lived but persistent compilation ouputs #24

Open MonsieurV opened 1 year ago

MonsieurV commented 1 year ago

Add support for persistent compilation outputs, allowing to cache for a time-period a compilation result and referring it by an URL. The persistence mode could then be configured on the instance (require registration, for 5 minutes max, until a cache quota is full, etc.)

Linked: async API and compilation state.


(from a correspondence with James Carlson)

At the moment the button in question processes some dummy content using your GET API. What I would like to use is this URL

 url = "https://latex.ytotech.com/builds/sync?content=" ++ model.contentForExport

However, if model.contentForExport is large (indeed not very large), using this url gives an error, Thus to test, I use

 url = "https://latex.ytotech.com/builds/sync?content=" ++ "\\documentclass{article}\n   \\begin{document}\n \\section*{Note}\n This feature coming soon!\\\\\n  \\end{document}

Would it be possible to provide some kind of alternate API? The idea would be make a POST request, but to have as response a link to the PDF file, That link (and the file) could have a very short lifetime, on the order of one minute