Create Attachment
POST
https://backend.test-hyegro.com/attachments/upload/
file (UploadFile): The file to be uploaded
file_name (str): Name of the file
file_type (str): Type of the file
file_size (int): Size of the file
bucket_name (str): Name of the storage bucket
storage_path (str): Path in storage
description (str, optional): Description of the attachment
parent_table (str, optional): Parent table name
parent_id (int, optional): Parent record ID
is_active (bool): Whether the attachment is active
is_private (bool): Whether the attachment is private
db (Session): The database session
current_user (schemas.User): The user creating the attachment
schemas.Attachment: The created attachment
Request
Query Params
schema
Schema
Any of
Body Params multipart/form-data
file
file
required
file_name
string
File Name
file_type
string
File Type
file_size
integer
File Size
bucket_name
string
Bucket Name
storage_path
string
Storage Path
Default:
description
Description
Any of
parent_table
Parent Table
Any of
parent_id
Parent Id
Any of
is_active
boolean
Is Active
Default:
true
Example:
true
is_private
boolean
Is Private
Default:
false
Example:
false
Responses
Modified at 2025-04-14 16:23:20