zer0bin icon indicating copy to clipboard operation
zer0bin copied to clipboard

:sparkles: Download paste endpoint

Open nullobsi opened this issue 2 years ago • 10 comments

i haven't written rust before but this seemed easy. it still needs tests :) /p/d/:id

nullobsi avatar Apr 04 '22 03:04 nullobsi

Looks good! Requesting review from @Domterion

ThatOneCalculator avatar Apr 04 '22 04:04 ThatOneCalculator

@nullobsi actually, feature request on this PR: make it download as a .md file if it matches the markdown rules

ThatOneCalculator avatar Apr 04 '22 05:04 ThatOneCalculator

make it download as a .md file if it matches the markdown rules

I'm not sure what the markdown rules are. Would the backend have to implement a Markdown parser?

-- Kayden Tebau @.***> https://nullob.si/ 🐺 woof

nullobsi avatar Apr 04 '22 17:04 nullobsi

I'm not sure what the markdown rules are. Would the backend have to implement a Markdown parser?

Nope. It's in the readme, but if a paste starts with ---, md or md\n it's a markdown paste.

ThatOneCalculator avatar Apr 04 '22 17:04 ThatOneCalculator

Should I make another PR for the download button?

nullobsi avatar Apr 04 '22 17:04 nullobsi

Id wait for #54 to be merged, fetch upstream, then add the icon to this pr.

ThatOneCalculator avatar Apr 04 '22 17:04 ThatOneCalculator

alright sounds good :)

nullobsi avatar Apr 04 '22 17:04 nullobsi

@nullobsi :D

ThatOneCalculator avatar Apr 04 '22 18:04 ThatOneCalculator

I think it's ready, but it needs some testing that I do not have time to do right now

nullobsi avatar Apr 04 '22 19:04 nullobsi

Code looks good! My approval will be had once tested! 🚀

mellowmarshe avatar Apr 05 '22 12:04 mellowmarshe