Hey there! In this guide, we'll cover how to upload various types of content like images, videos, audio files, and attachments (like PDFs) in Xano. Let's dive in!
Before we start uploading content, we need to set up the appropriate field in our database to store the content metadata.
Note that Xano stores the metadata of the file, not the actual file itself. We'll see why this is important when we jump into the function stack and API.
For a quick test, you can upload content directly from the database:
You'll see a preview of the file, along with options to download it, copy the image URL, and even preview it in your browser using the copied URL.
While the raw database entry is handy for testing, you'll typically upload content through the API in a real-world scenario. Here's how:
You can upload files directly using the file picker or provide a file URL in the JSON input.
For example, to upload an image URL:
If you need to create the file resource from an external API response, use the "Create File Resource" function in the Content Upload section before creating the metadata.
Xano provides pre-built endpoints for uploading content, which can save you time:
These pre-built endpoints include the necessary steps for creating the file resource, generating the metadata, and (optionally) adding the content to a record.
That's it! You're now ready to start uploading and managing all sorts of content in your Xano applications. Don't forget to subscribe to our channel, like the video, and stay tuned for more helpful guides!
This transcript was AI generated to allow users to quickly answer technical questions about Xano.
I found it helpful
I need more support