### Get Upload URL Source: https://vikingfile.com/api Obtain a pre-signed URL for uploading files. This is the first step in a multi-part upload process. ```APIDOC ## Get upload url ### Method POST ### Endpoint https://vikingfile.com/api/get-upload-url ### Parameters #### Query Parameters - **size** (integer) - Required - Size of the file to upload in bytes. ### Response #### Success Response (200) - **uploadId** (string) - Unique identifier for the upload. - **key** (string) - The key associated with the upload. - **partSize** (integer) - The recommended size for each part of the upload. - **numberParts** (integer) - The total number of parts the file will be split into. - **urls** (array of strings) - Pre-signed URLs for uploading each part. ### Response Example ```json { 'uploadId': 'ANWA...SE1M', 'key': 'rZ2h9ZqVQi', 'partSize': 1073741824, 'numberParts': 3, 'urls': [ "https://upload.vikingfile.com/rZ2h9ZqVQi?partNumber=1&uploadId=ANWA...", "https://upload.vikingfile.com/rZ2h9ZqVQi?partNumber=2&uploadId=ANWA...", "https://upload.vikingfile.com/rZ2h9ZqVQi?partNumber=3&uploadId=ANWA..." ] } ``` ``` -------------------------------- ### Get Upload Server Source: https://vikingfile.com/api Retrieve the base URL for the upload server. This is useful for legacy upload methods or direct uploads. ```APIDOC ## Get upload server ### Method GET ### Endpoint https://vikingfile.com/api/get-server ### Response #### Success Response (200) - **server** (string) - The URL of the upload server. ### Response Example ```json { "server": "https://upload.vikingfile.com" } ``` ``` -------------------------------- ### Upload Part File Source: https://vikingfile.com/api Upload a specific part of a file using the PUT method to the URL obtained from the 'Get upload url' endpoint. ```APIDOC ## Upload each part file ### Method PUT ### Endpoint URL returned by `https://vikingfile.com/api/get-upload-url` ### Description Upload a specific part of a file using the PUT method to the URL obtained from the 'Get upload url' endpoint. ### Response #### Success Response - **ETAG** (header) - The ETAG of the uploaded part. ``` -------------------------------- ### List Files Source: https://vikingfile.com/api List files within a specified path for your user account. Supports pagination. ```APIDOC ## List files ### Method POST ### Endpoint https://vikingfile.com/api/list-files ### Parameters #### Request Body - **user** (string) - Required - Your user's hash. - **page** (integer) - Required - The current page number for pagination. - **path** (string) - Optional - The file path to list files from, e.g., `Folder/My sub folder`. ### Response #### Success Response (200) - **currentPage** (integer) - The current page number. - **maxPages** (integer) - The total number of available pages. - **files** (array of objects) - A list of files, each with `hash`, `name`, `size`, `downloads`, and `created` properties. ### Response Example ```json { "currentPage": 1, "maxPages": 4, "files": [ {"hash": "TPRSfLvcIu", "name": "file.rar", "size":10000000, "downloads":0, "created": "2025-12-25 10:01"}, {"hash": "TPRSfLvcIv", "name": "file.png", "size":15000000, "downloads":10, "created": "2025-12-26 15:05"}, {"hash": "TPRSfLvcIw", "name": "file.zip", "size":19000000, "downloads":5, "created": "2025-12-27 18:39"} ] } ``` ``` -------------------------------- ### Upload Bash Script Usage Source: https://vikingfile.com/software Use this bash script to upload files. Specify the file path and optionally a destination folder. Ensure your user's hash is added to the script. ```bash Usage : ./vikingfile.sh "file.png" ./vikingfile.sh "file.png" "my folder/my subfolder" ``` -------------------------------- ### Upload File (Legacy) Source: https://vikingfile.com/api Upload a file directly to the server. This method is considered legacy and may have limitations compared to multi-part uploads. ```APIDOC ## Upload file (legacy) ### Method POST ### Endpoint Server URL returned by `https://vikingfile.com/api/get-server` ### Parameters #### Request Body - **file** (file) - Required - The file to upload. - **user** (string) - Required - Your user's hash. Leave empty for anonymous uploads. - **path** (string) - Optional - The desired path for the file, e.g., `Folder/My sub folder`. - **pathPublicShare** (string) - Optional - The public share path identifier, e.g., `auLXofS1Ku7SrnzA90nOz1`. ### Response #### Success Response (200) - **name** (string) - The name of the uploaded file. - **size** (integer) - The size of the uploaded file in bytes. - **hash** (string) - The unique hash of the uploaded file. - **url** (string) - A URL to access the uploaded file. ### Response Example ```json { "name": "example.txt", "size": 12345, "hash": "TPRSfLvcIu", "url": "https://vikingfile.com/f/TPRSfLvcIu" } ``` ``` -------------------------------- ### Complete Upload Source: https://vikingfile.com/api Finalize the file upload process after all parts have been uploaded. This requires the upload ID, key, and details of each uploaded part. ```APIDOC ## Complete upload ### Method POST ### Endpoint https://vikingfile.com/api/complete-upload ### Parameters #### Request Body - **key** (string) - Required - The key associated with the upload. - **uploadId** (string) - Required - The unique identifier for the upload. - **parts** (string) - Required - Details of each uploaded part in the format `parts[0][PartNumber]=1&parts[0][ETag]=...`. - **name** (string) - Required - The desired filename. - **user** (string) - Required - Your user's hash. Leave empty for anonymous uploads. - **path** (string) - Optional - The desired path for the file, e.g., `Folder/My sub folder`. - **pathPublicShare** (string) - Optional - The public share path identifier, e.g., `auLXofS1Ku7SrnzA90nOz1`. ### Response #### Success Response (200) - **name** (string) - The name of the uploaded file. - **size** (integer) - The size of the uploaded file in bytes. - **hash** (string) - The unique hash of the uploaded file. - **url** (string) - A URL to access the uploaded file. ### Response Example ```json { "name": "example.txt", "size": 12345, "hash": "TPRSfLvcIu", "url": "https://vikingfile.com/f/TPRSfLvcIu" } ``` ``` -------------------------------- ### Upload Remote File Source: https://vikingfile.com/api Upload a file from a remote URL. The server will download the file from the provided link. ```APIDOC ## Upload remote file ### Method POST ### Endpoint Server URL returned by `https://vikingfile.com/api/get-server` ### Parameters #### Request Body - **link** (string) - Required - The URL of the remote file to upload. - **user** (string) - Required - Your user's hash. Leave empty for anonymous uploads. - **name** (string) - Optional - A new filename for the uploaded file. - **path** (string) - Optional - The desired path for the file, e.g., `Folder/My sub folder`. - **pathPublicShare** (string) - Optional - The public share path identifier, e.g., `auLXofS1Ku7SrnzA90nOz1`. ### Response #### Success Response (200) - **name** (string) - The name of the uploaded file. - **size** (integer) - The size of the uploaded file in bytes. - **hash** (string) - The unique hash of the uploaded file. - **url** (string) - A URL to access the uploaded file. ### Response Example ```json { "name": "example.txt", "size": 12345, "hash": "TPRSfLvcIu", "url": "https://vikingfile.com/f/TPRSfLvcIu" } ``` ``` -------------------------------- ### Check File Source: https://vikingfile.com/api Check if a file exists in VikingFile storage by its hash. You can check multiple hashes in a single request. ```APIDOC ## Check file ### Method POST ### Endpoint https://vikingfile.com/api/check-file ### Parameters #### Request Body - **hash** (string or array of strings) - Required - The hash of the file to check, e.g., `TPRSfLvcIu`. An array of up to 100 hashes is also supported. ### Response #### Success Response (200) - **exist** (boolean) - Indicates whether the file exists. - **name** (string) - The name of the file if it exists. - **size** (integer) - The size of the file in bytes if it exists. ### Response Example ```json { "exist": true, "name": "example.txt", "size": 12345 } ``` ``` -------------------------------- ### Rename File Source: https://vikingfile.com/api Rename an existing file in VikingFile storage. Requires the file's hash, your user hash, and the new filename. ```APIDOC ## Rename file ### Method POST ### Endpoint https://vikingfile.com/api/rename-file ### Parameters #### Request Body - **hash** (string) - Required - The hash of the file to rename, e.g., `TPRSfLvcIu`. - **user** (string) - Required - Your user's hash. - **filename** (string) - Required - The new name for the file. ### Response #### Success Response (200) - **error** (string) - Indicates the status of the operation, e.g., `success`. ``` -------------------------------- ### Delete File Source: https://vikingfile.com/api Delete a file from VikingFile storage using its hash and your user hash. ```APIDOC ## Delete file ### Method POST ### Endpoint https://vikingfile.com/api/delete-file ### Parameters #### Request Body - **hash** (string) - Required - The hash of the file to delete, e.g., `TPRSfLvcIu`. - **user** (string) - Required - Your user's hash. ### Response #### Success Response (200) - **error** (string) - Indicates the status of the operation, e.g., `success`. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.