diff --git a/views/index.html b/views/index.html index a1eb28b..a83590d 100644 --- a/views/index.html +++ b/views/index.html @@ -5,19 +5,240 @@ FITRA - File transfer API -

🚀 FITRA - File transfer API

-

Version: 1.0.0

-

Simple file upload and download service for developers using HTTP requests in CLI.

- -
-

💾 Todays storage usage

-

- This resets after 24h -

-
-
+
+

🚀 FITRA - File transfer API

+
Version 1.0.0
+

Simple file upload and download service for developers using HTTP requests in CLI.

+

Contact me on Matrix: @root@adhd.sh or via Discord: nu11ed

+ +
+

💾 Todays storage usage

+

+ This resets after 24h +

+
+
+
+
+ Loading... + Loading... + Loading... +
-
- Loading... - Loading... - Loading... + +

📋 API endpoints

+ +
+ +

POST/upload

+

Description: Upload a file

+

cURL example:

+
curl -X POST -F "file=@/path/to/your/file.txt" {{.BaseURL}}/upload
-
- -

📋 API endpoints

- -
-

POST/upload

-

Description: Upload a file

-

cURL example:

-
curl -X POST -F "file=@/path/to/your/file.txt" {{.BaseURL}}/upload
-
- -
-

GET/uploads/{fileID}/{filename}

-

Description: Download a file using the ID and filename from upload response

-

cURL example:

-
curl -O {{.BaseURL}}/uploads/{fileID}/{filename}
-
- -
-

GET/storage

-

Description: Check storage usage and capacity

-

cURL example:

-
curl {{.BaseURL}}/storage
-
- -
-

GET/health

-

Description: Check service health

-

cURL example:

-
curl {{.BaseURL}}/health
-
- -

🔄 Usage

-
- Step 1: Upload a file using POST /upload with form-data 'file' parameter -
-
- Step 2: Use the returned 'id' and 'filename' to construct download URL -
-
- Step 3: Download the file using GET /uploads/{id}/{filename} -
- -

💡 Examples

-
# 1. Upload a file
+        
+        
+ +

GET/uploads/{fileID}/{filename}

+

Description: Download a file using the ID and filename from upload response

+

cURL example:

+
curl -O {{.BaseURL}}/uploads/{fileID}/{filename}
+
+ +
+ +

GET/storage

+

Description: Check storage usage and capacity

+

cURL example:

+
curl {{.BaseURL}}/storage
+
+ +
+ +

GET/health

+

Description: Check service health

+

cURL example:

+
curl {{.BaseURL}}/health
+
+ +

🔄 Usage

+
+ Step 1: Upload a file using POST /upload with form-data 'file' parameter +
+
+ Step 2: Use the returned 'id' and 'filename' to construct download URL +
+
+ Step 3: Download the file using GET /uploads/{id}/{filename} +
+ +

💡 Examples

+
# 1. Upload a file
 curl -X POST -F "file=@myfile.txt" {{.BaseURL}}/upload
 
 # Response will include:
@@ -100,6 +327,21 @@ curl -X POST -F "file=@myfile.txt" {{.BaseURL}}/upload
 
 # 2. Download the file
 curl -O {{.BaseURL}}/uploads/abc123.../myfile.txt
+
+ +
+
+

📝 Changelog

+ +
+
v1.0.0
+
2024-12-01
+
    +
  • Initial release
  • +
+
+
+
\ No newline at end of file