Starfiles

File sharing done simple.

Home

API (Developer Tools)

API can be complicated. If you plan on using Starfiles' API in a website, it is recommended to use our very own Javascript library - StarfilesJS.

You will receive a file ID when a file is successfully uploaded. The file's link is:

https://starfiles.ml/file/ID

Simple File Uploads

Endpoint: https://api.starfiles.ml/upload/upload_file

Endpoint to upload file to a folder: https://api.starfiles.ml/upload/upload_file?folder=xxxx&profile=yyyy
When uploading to a folder, you must own the folder. Replace yyyy with the verification code shown at Sync Profiles.

Parameter Name: upload

Parameter Content: example.txt

Max file size: 100mb

HTML | Python | PHP | Curl

Want to upload larger files?

Endpoint: https://upload.starfiles.ml

Max file size: 2gb

Chunked File Upload

Files are split into chunks of 2MB (2097152 bytes). Each chunk needs to be uploaded separately.

Endpoint: https://api.starfiles.ml/upload/upload_file

Parameters:

upload: file

number_of_chunks: chunk count

chunk_number: chunk number

The last chunk uploaded will return the file ID.

Upload from URL

This API will only work for Patreon members.

Endpoint: https://api.starfiles.ml/upload/upload_url?profile=xxxx

Replace xxxx with the verification code shown at Settings.

Parameter:

Method: POST

url: https://example.com/example.txt

StarfilesJS

A plug and play javascript library.

<!-- StarfilesJS -->
<script id="starfilesuploadscript" src="https://cdn.starfiles.ml/smalljs.php?file=upload"></script>
            
<!-- Dependencies -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/core.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/sha256.js"></script>
<script src="https://starfiles.ml/assets/js/jszip.min.js"></script>

<!-- Upload form -->
<input type="file" id="uploaded_file" onchange="uploadFile()" multiple="multiple">

<!-- Outputs -->
<div id="preuploadoutput"></div>
<div id="output"></div>

<!-- Upload Progress -->
<div id="progress">
    <span id="progressContainer"></span>
    <span id="remaining_size"></span>
    <span id="eta"></span>
    <span id="status"></span>
    <span id="upload_speed"></span>
</div>

Delete file

Endpoint: https://api.starfiles.ml/file/delete

Parameter:

profile: xxxx

file: ID

Method: GET

Example: https://api.starfiles.ml/file/delete?file=26ae82&profile=xxxx

Get file information

Endpoint: https://api.starfiles.ml/file/fileinfo

Parameter:

File: ID

Method: GET

Example: https://api.starfiles.ml/file/fileinfo?file=26ae82

Example Output:

{
    "name":"face.png",
    "extension":"png",
    "mime_type":"image/png",
    "size":"654382",
    "tidy_size":"639.04KB",
    "upload_time":"1598272797",
    "time_ago" : "19 days ago",
    "download_count":"0"
}