Get upload server

This API endpoint allows you to retrieve an upload server.

Endpoint

https://vikingfile.com/api/get-server

Method

GET

Parameters

This endpoint does not require any parameters.

Response

The response will be a JSON object containing the upload server information.

Example Response

{
 "server": "https://upload.vikingfile.com"
}





Upload file

This API endpoint allows you to upload a file to the server returned by /api/get-server.

Endpoint

server returned by https://vikingfile.com/api/get-server

Method

POST

Parameters

Response

The response will be a JSON object containing information about the uploaded file.

Example Response

{
 "name": "example.txt",
 "size": 12345,
 "hash": "TPRSfLvcIu",
 "url": "https://vikingfile.com/f/TPRSfLvcIu"
}





Upload remote file

This API endpoint allows you to upload a remote file to the server returned by /api/get-server.

Endpoint

server returned by https://vikingfile.com/api/get-server

Method

POST

Parameters

Response

The response will be a JSON object containing information about the uploaded file.

Example Response

{
 "name": "example.txt",
 "size": 12345,
 "hash": "TPRSfLvcIu",
 "url": "https://vikingfile.com/f/TPRSfLvcIu"
}





Delete file

This API endpoint allows you to delete your file.

Endpoint

https://vikingfile.com/api/delete-file

Method

POST

Parameters

Response

The response will be a JSON object.

Example Response

{
 "error": "success"
}





Rename file

This API endpoint allows you to rename your file.

Endpoint

https://vikingfile.com/api/rename-file

Method

POST

Parameters

Response

The response will be a JSON object.

Example Response

{
 "error": "success"
}





Check file

This API endpoint allows you to check if file exists.

Endpoint

https://vikingfile.com/api/check-file

Method

POST

Parameters

Response

The response will be a JSON object.

Example Response

{
 "exist": true,
 "name": "example.txt",
 "size": 12345,
}