{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Upload Media","slug":"upload-media","description":"
Datasquirel comes baked with an integrated static file directory. This makes it easy to upload public and private files and access it from anywhere.
","content":"Media management is a bigger problem than it sounds at first. Images tend to get out of hand when adding them to web projects: your images need to be well optimized for fast loading, easily accessible, and maintain clarity so that your website doesn't look like it's from the 80's. Datasquirel does this all for you in a few clicks.
Every datasquirel account is created with two directories for media storage: one is public, and the other is private. To start adding media, follow these steps:
If you created a database already, with an image for this database, your media folder will be pre-populated with a folder named after your database (test
in this case), and it will contain the image you uploaded when you created the database.
To add a new media, click on Add Media button. This will open a modal for you to choose which type of media you want to add.
There are two options available at this time: Images, and Files. Image uploads only allow the image types listed in the description, the same applies with files. Click on the desired type and select the files you want to upload. You can upload multiple files at the same time.
The next modal gives you the option to further change attributes of the images before uploading. These attributes include the image name, and privacy. Private images can only be accessed via out API using your Read Only or Full Access API keys.
After you're set, click on \"Upload Media\". This process uploads selected media to their respective directories. But that's not all, each media is compressed automatically, using a max width of 1800px, and each media comes with an automatically generated thumbnail. So For each image you upload, you have two images. The thumbnail image contains a suffix _thumbnail
added to the original image's name.
After images have been uploaded, you can now copy the link for *public images and share anywhere, you can also copy the thumbnail link. NOTE, you cannot share private images publicly, private images don't have a public URL, they can only be accessed through OUR API with valid credentials.
Adding folders help to better organize media. We currently have 2 depths of folder structure. So you can create a folder, and a sub-folder. To create a folder, simply navigate to your Media admin page and click \"Add Folder\".
Add a folder name and click \"Add New Folder\". Your new folder is now ready to go. Click on the new folder and you can upload images and files to that folder.
"}},"__N_SSG":true}