<aside> 💡 "Unused data is useless. Make the data flow!" Anyone can access the metadata of multimedia content published with Macula.Link in the form of JSON endpoints. Focus on using the data instead of figuring out how to retrieve it.

</aside>

Data Sources are one of the core mechanisms that make up Macula.Link sharing engine, enabling the delivery of not only the file itself but also supplementary details and metadata in a standardized format.

When sharing a file with UniLink, the type of data source is determined automatically depending on the extension the consumer (browser, webpage, app, etc.) is requesting. At the moment, two data source types are available:

<aside> 💡 When sharing with Unilinks, you don’t need to specify the actual file extension (.jpeg, .mp3, etc.). Macula.Link provides this information so that the consumer can correctly determine what kind of media is shared and how to process it.

</aside>

Data Sources Applications

While the role of the Binary Data Source is quite straightforward (to serve the file to the consumer), the JSON Data Source may require additional explanation.

First and foremost, JSON Data Source allows you to retrieve all the available information about the file without loading the file itself. What are the potential uses for that?

Let’s go over a few examples:

Using Data Sources

Using Data Source in practice is extremely simple and straightforward. Depending on the case, you can use either binary or JSON Data Source.

Binary Data Source

Whenever you need the actual file, just paste the UniLink without extension and forward slash.

<aside> 💡 Binary Data Source acts as a direct link to the file you are requesting.

</aside>

<img src="<https://u.macula.link/FILE_ID>" alt="My awesome image"/>

And, of course, you can retrieve the binary output directly. In the following example we simply output the contents of the file to the terminal (-o - tells curl to send the output to the terminal; it’s equivalent to -output -; use--output <FILE> to send the output to a file):