Getting started

To get started with Tiny Drive, try one of the starter projects below, or follow our guide on Implementing Tiny Drive with your system.

Starter projects

To get started quickly and understand how Tiny Drive works, Tiny recommends trying one of the starter projects on GitHub to set up a Tiny Drive.

The starter projects have their own procedures to get Tiny Drive up and running. Choose a starter project of a familiar language and follow the steps to setup Tiny Drive. The links will take you to the GitHub page for the starter project of your choice, where the source code is available for you to view.

Choose a familiar language

netcore

nodejs

php

java

.NET Core

Node.js

PHP

Java Spring

Implementing Tiny Drive with your system

The steps required for setting up Tiny Drive are:

  1. Register for a Tiny Cloud API key.

  2. Add a public key to the Tiny Cloud API key.

  3. Set up a JSON Web Token (JWT) Provider endpoint (or server).

  4. Configure the required TinyMCE options.

1. Register for a Tiny Cloud API key

If you do not have a Tiny Cloud API key, you can sign up for a trial or purchase a subscription on the Tiny pricing page.

The Tiny Drive Server requires a public key generated from the same private key that will be used on your JSON Web Token (JWT) provider endpoint. The public key(s) stored on the Tiny Drive Server are used to ensure that content is sent by authorized users.

There are two methods for generating and adding a public key to your API key:

  1. The secure key pair generator at Tiny Account - JWT Keys (recommended).

  2. Generate a key pair locally and add the public key to Tiny Account - JWT Keys.

Generate a key pair using the Tiny Account JWT Keys page

The Tiny Account - JWT Keys page provides a private/public key generator, providing a quick and secure way of generating the required keys. This generator will store a copy of the public key, and provide a downloadable file for both the public and private keys. Tiny does not store the private key and the key pair cannot be retrieved later.

Generate a key pair locally

When generating a key pair locally, use one of the supported algorithms. Tiny Drive does not support symmetrical encryption algorithms, such as HS256. Tiny recommends using the RS256 algorithm. The following algorithms are supported:

  • RS256

  • RS384

  • RS512

  • PS256

  • PS384

  • PS512

For instructions on generating a key pair locally, see: Creating a private/public key pair for Tiny Cloud.

2. Add a public key to the Tiny Cloud API key

Once a public key has been generated, add the public key to the Tiny Cloud API key at: Tiny Account - JWT Keys.

3. Set up a JSON Web Token (JWT) Provider endpoint

Tiny Drive requires setting up JSON Web Token (JWT) authentication. This is to ensure that only authenticated users will be able to access Tiny Drive.

For information on setting up a JSON Web Token Provider endpoint, see: Tiny Drive JWT Authentication Setup.

4. Configure the required TinyMCE options

To enable the Tiny Drive plugin:

For example:

tinymce.init({
  selector: 'textarea',  // change this value according to your html
  plugins: 'tinydrive',
  toolbar: 'insertfile',
  tinydrive_token_provider: 'URL_TO_YOUR_TOKEN_PROVIDER'
});

Next Steps

For information on: