raftario / filite

A simple, light and standalone pastebin, URL shortener and file-sharing service
MIT License
190 stars 16 forks source link

Parse_id excludes file extension #30

Closed Vam-Jam closed 3 years ago

Vam-Jam commented 3 years ago

This PR allows Parse_id to find the correct id when there's an extension included with the request.

Example: I want to embed an mp4 into discord. So i request a1b2c3.mp4, but the server returns Invalid ID because of the extension. With this change the server responds with the correct file

raftario commented 3 years ago

Thanks for the PR ! I wish clients actually made use of the content-type header but since that's not the case in practice that should be really useful.