This API endpoint allows you to retrieve an upload server.
https://vikingfile.com/api/get-server
GET
This endpoint does not require any parameters.
The response will be a JSON object containing the upload server information.
{ "server": "https://upload.vikingfile.com" }
This API endpoint allows you to upload a file to the server returned by /api/get-server
.
server returned by https://vikingfile.com/api/get-server
POST
file
(required) - The file to upload. This should be sent as a multipart/form-data request.user
(required) - The user's hash. Empty for anonymous upload.The response will be a JSON object containing information about the uploaded file.
{ "name": "example.txt", "size": 12345, "hash": "TPRSfLvcIu", "url": "https://vikingfile.com/f/TPRSfLvcIu" }
This API endpoint allows you to upload a remote file to the server returned by /api/get-server
.
server returned by https://vikingfile.com/api/get-server
POST
link
(required) - The link to upload.user
(required) - The user's hash. Empty for anonymous upload.name
(optional) - The new filename.The response will be a JSON object containing information about the uploaded file.
{ "name": "example.txt", "size": 12345, "hash": "TPRSfLvcIu", "url": "https://vikingfile.com/f/TPRSfLvcIu" }
This API endpoint allows you to delete your file.
https://vikingfile.com/api/delete-file
POST
hash
(required) - Hash file, exemple : TPRSfLvcIuuser
(required) - Your user's hashThe response will be a JSON object.
{ "error": "success" }
This API endpoint allows you to rename your file.
https://vikingfile.com/api/rename-file
POST
hash
(required) - Hash file, exemple : TPRSfLvcIuuser
(required) - Your user's hashfilename
(required) - New filenameThe response will be a JSON object.
{ "error": "success" }
This API endpoint allows you to check if file exists.
https://vikingfile.com/api/check-file
POST
hash
(required) - Hash file, exemple : TPRSfLvcIuThe response will be a JSON object.
{ "exist": true, "name": "example.txt", "size": 12345, }