GET
/services/files/list/{path}
دریافت لیست فایلها و پوشههای یک مسیر
📌 Path Parameters:
| پارامتر | نوع | توضیح |
| path | string | مسیر نسبی (خالی = ریشه کاربر) |
curl -X GET https://api.up4u.ir/services/files/list/ \
-b cookies.txt
✅ Response Example:
{
"path": "",
"directoryInfo": [
{ "filePath": "docs", "lastModified": 1712345678000 }
],
"fileInfo": [
{ "filePath": "file.txt", "size": 1024, "lastModified": 1712345678000 }
]
}
GET
/services/files/download/{path}
دانلود فایل
curl -X GET https://api.up4u.ir/services/files/download/docs/file.txt \
-b cookies.txt \
-o file.txt
POST
/services/files/upload/{path}/{filename}
آپلود فایل
curl -X POST https://api.up4u.ir/services/files/upload/docs/file.txt \
-F "file=@/local/path/file.txt" \
-b cookies.txt
DELETE
/services/files/delete/{path}
حذف فایل یا پوشه
curl -X DELETE https://api.up4u.ir/services/files/delete/docs/file.txt \
-b cookies.txt
POST
/services/files/createdir/{path}
ایجاد پوشه جدید
curl -X POST https://api.up4u.ir/services/files/createdir/docs/newfolder \
-b cookies.txt
POST
/services/files/rename/{path}
تغییر نام فایل یا پوشه
📦 Body Parameters (JSON):
| پارامتر | نوع | توضیح |
| destinationPath | string | نام جدید (مسیر کامل) |
curl -X POST https://api.up4u.ir/services/files/rename/docs/oldname.txt \
-H "Content-Type: application/json" \
-d '{"destinationPath": "docs/newname.txt"}' \
-b cookies.txt
POST
/services/files/copy/{path}
کپی فایل یا پوشه
curl -X POST https://api.up4u.ir/services/files/copy/docs/file.txt \
-H "Content-Type: application/json" \
-d '{"destinationPath": "backup/file.txt"}' \
-b cookies.txt
POST
/services/files/zip/{path}
فشردهسازی فایل یا پوشه (تکی)
curl -X POST https://api.up4u.ir/services/files/zip/docs \
-H "Content-Type: application/json" \
-d '{"zipName": "myarchive"}' \
-b cookies.txt
POST
/services/files/bulk-zip
فشردهسازی چند فایل/پوشه (گروهی)
curl -X POST https://api.up4u.ir/services/files/bulk-zip \
-H "Content-Type: application/json" \
-d '{"paths": ["docs/file1.txt", "docs/file2.txt"], "zipName": "archive"}' \
-b cookies.txt
POST
/services/files/extract/{path}
خارج کردن فایل فشرده (Zip)
curl -X POST https://api.up4u.ir/services/files/extract/docs/archive.zip \
-H "Content-Type: application/json" \
-d '{"destinationPath": "docs/extracted"}' \
-b cookies.txt
GET
/services/files/audit/{path}
دریافت گزارش فعالیت فایل (تعداد دانلود، آپلود و ...)
curl -X GET https://api.up4u.ir/services/files/audit/docs/file.txt \
-b cookies.txt