Tiny Drive plugin setup options
tinydrive_token_provider
This option could take one of the following two forms:
-
A URL to a page or endpoint that accepts a HTTP JSON POST request, and produces a JSON structure with a valid JWT.
-
A function that provides the same token through a callback, allowing a HTTP request in any desired format. The token provider function should have a success and a failure callback, where:
-
The success callback accepts an object with a
token
property containing the JWT -
The failure callback accepts a string to present as an error message if the token could not be produced.
-
For information on how to create these tokens, refer to the JWT authentication guide.
Type: String
or Function
Required: yes
tinydrive_upload_path
This option sets the default upload path for files:
-
Pasted into the editor,
-
Uploaded to the editor through the Image dialog, or
-
Dragged and dropped into the editor.
It will produce a date-based structure within this path, such as: /uploads/{year}{month}{day}
. This is to avoid having thousands of files in the same directory.
Type: String
Default value: "/uploads"