davidcarlisle / latexcgi

LaTeX server via perl cgi script, developed for learnlatex.org
https://davidcarlisle.github.io/latexcgi/
MIT License
32 stars 3 forks source link

load a png file or jpg file #22

Open guironne opened 6 months ago

guironne commented 6 months ago

Hello, I would like to load png file with : \includegraphics[width=15cm]{file.png}

in request : filecontents[]: what encoding is supported ?

could you provide an example with a image file?

thank you

davidcarlisle commented 6 months ago

I don't support uploading images to the test server at for example

https://davidcarlisle.github.io/latexcgi/run

However any server that makes use of this script can use available images in documents that are uploaded for example

https://davidcarlisle.github.io/latexcgi/test2#scottish-play

shows an image of Macbeth that is on the server and

https://www.learnlatex.org/en/lesson-07

shows use of example-image graphics that are available via texlive.

In the http post submission perl code I don't support any binary files or unpack any encoded files, the attachments are just stored as-is so basically just text/plain uploads.

It's not an unreasonable request but this is a free service offered with no user login, and I have to balance the risks.

The http post handler of course is open source and available from here so on your own server you are free to use a modified version that handles the content encoding of the multipart/form-data fields and unpacks binary files appropriately but I don't want to handle that at the open server running at texlive.net, sorry.