Use PUT API for uploading
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
# Pixeldrain API documentation
|
||||
# API documentation
|
||||
|
||||
Methods for using pixeldrain programmatically.
|
||||
|
||||
## Authentication
|
||||
|
||||
The methods for uploading and retrieving files don't require an API key. The
|
||||
methods for creating and retrieving lists also don't require an API key. All
|
||||
@@ -37,6 +41,22 @@ The path is to be appended to the API URL, so "/file/someid/thumbnail" becomes
|
||||
The base URL for the API is "{{apiUrl}}", all paths below are relative to that
|
||||
URL.
|
||||
|
||||
## curl example
|
||||
|
||||
Here's how to anonymously upload a file using curl:
|
||||
|
||||
```
|
||||
curl -T "file_name.txt" https://pixeldrain.com/api/file/
|
||||
```
|
||||
|
||||
You can also upload a file to your pixeldrain account using curl. Get an API key
|
||||
from the [API keys page](/user/api_keys) and enter it in the command. Replace
|
||||
the example API key here with your own:
|
||||
|
||||
```
|
||||
curl -T "file_name.txt" -u :5f45f184-64bb-4eaa-be19-4a5f0459db49 https://pixeldrain.com/api/file/
|
||||
```
|
||||
|
||||
## Form value order
|
||||
|
||||
I recommend you put files at the end of every file upload form. By doing this
|
||||
|
Reference in New Issue
Block a user