fix: minor adjustments to ci
storage-hideyoshi.com
Made for managing files in Storage Services, currently only supporting AWS S3. This project was made for the hideyoshi.com project, but all code in this repo is distributed freely by the GPLv3 License.
This project implements endpoints for manipulation of files in Storage Services and implements a worker for treatment of files and virus checking.
Environment Variables
To run this project, you will need to add the following environment variables to your .env file
-
Server Configuration:
ALLOWED_ORIGINS: Url of the allowed origins;SERVER_HOST: FastAPI server ipSERVER_PORT: FastAPI server port -
Redis Configuration:
REDIS_HOST: Redis HostREDIS_PORT: Redis PortREDIS_PASSWORD: Redis Password -
Storage Service Configuration:
STORAGE_TYPE: Currently only supportss3-
S3 Configuration:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGION_NAMEAWS_BUCKET_NAMEEXPIRES_IN
-
-
Virus Checker Configuration:
VIRUS_CHECKER_TYPE: Currently only supportstotal_virusVIRUS_CHECKER_API_KEY
Usage
All dependencies can be installed via poetry:
poetry install --no-dev
For the execution of REST Server:
poetry run ./run-queue.sh
For the execution of the Queue Worker:
poetry run ./run-queue.sh --queue
API Reference
Get file read link
GET /file
| Parameter | Type | Description |
|---|---|---|
username |
string |
Required. Username of file owner |
file_postfix |
string |
Required. Type of desired file |
Returns:
{
"presigned_url": string
}
Get file write link
POST /file
| Parameter | Type | Description |
|---|---|---|
username |
string |
Required. Username of file owner |
file_postfix |
string |
Required. Type of desired file |
file_type |
string |
Required. File format |
Returns:
{
"presigned_url": string,
"file_key": string
}
Delete file
DELETE /file
| Parameter | Type | Description |
|---|---|---|
username |
string |
Required. Username of file owner |
file_postfix |
string |
Required. Type of desired file |
Process file
POST /file/process
| Parameter | Type | Description |
|---|---|---|
username |
string |
Required. Username of file owner |
file_postfix |
string |
Required. Type of desired file |