plik
plik copied to clipboard
Request: Show small text files in browser
Hi,
I think it would be better to offer .txt files (and probably other extensions such as .sh .ps1) as text/plain and Content-Disposition: inline This would allow Plik to become a "self hosted paste service" as well
Hi,
I've noticed that for short text files the mime-content type detector does not work.
https://github.com/root-gg/plik/blob/master/server/handlers/add_file.go#L229
For large pastes it seems to detect text/plain. I need to take a closer look.
Could be a good idea to add "inline" to the content disposition header indeed.
https://github.com/root-gg/plik/blob/master/server/handlers/get_file.go#L96
Best, Cam
On Fri, 28 Jan 2022, 06:26 Andy Pilate, @.***> wrote:
Hi,
I think it would be better to offer .txt files (and probably other extensions such as .sh .ps1) as text/plain and Content-Disposition: inline This would allow Plik to become a "self hosted paste service" as well
— Reply to this email directly, view it on GitHub https://github.com/root-gg/plik/issues/410, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ5XPVYSDUWBTAC2AT6UGTUYISHJANCNFSM5M72PSZQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
https://github.com/root-gg/plik/commit/2c9c4464d8f9af4eddb9f618747d84b98267615d