Copy one snippet, open it in a browser and you're uploading files. No account or dashboard visit needed until you want your own key.
No account needed to try it. This page uses the shared demo key, so save it as index.html, open it in a browser and upload a file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14<!DOCTYPE html> <html lang="en"> <head> <title>My Fileboy app</title> </head> <body> <script> FILEBOY_PUBLIC_KEY = "demo" FILEBOY_API_URL = "https://api.fileboy.io" </script> <script src="https://unpkg.com/@cd2/fileboy-browser@1.0.0"></script> <input type="hidden" data-fileboy /> </body> </html>
The page shows a file uploader. Once a file is uploaded, the input holds its Fileboy ID, which you save to display the file later.
Create a free account, make an app and copy its publicKey from the dashboard, then replace demo in the snippet. Sign up with GitHub, Google or email.
Apps keep their files, settings and keys separate, so use one per project. Each app also has a privateKey for protected actions like deleting files; keep that one on your server.
In your Fileboy app, you can go to the files page to see all the files you've uploaded. These files all have a Fileboy ID that can be used to grab the file to display however you want.
The simplest example of this is if you upload an image - display the image:
1<img src="https://api.fileboy.io/files/get/YOUR-IMAGE-FILEBOY-ID">
Fileboy works best with our prebuilt SDKs - they make uploading, fetching, deleting files simple. Take a look at the libraries docs on the left.
If you want something even more customised - take a look at the API docs for a full featured API allowing you to customise your Fileboy experience deeper.