PacketFire / paste-click

Paste text, images, video or any file
http://paste.click
3 stars 1 forks source link

Metadata endpoint #32

Open RaasAhsan opened 5 years ago

RaasAhsan commented 5 years ago

For the browser application, it would be beneficial if there was an endpoint we could hit to only fetch metadata. The reason is that we want to fetch the metadata for an object first before actually fetching the content, so we can determine how we want to render it.

If the object is text/plain or something similar, we'll make a GET request for the object ID and render the content. If the object is an image, we'll actually just want to put the URL in a <img src /> element without actually issuing a GET from JavaScript.