Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UploadFile ¶
func UploadFile(fileBuffer *bytes.Buffer, fileName string, timeout time.Duration, userHash string) (string, error)
UploadFile uploads a file from a bytes.Buffer to CatBox. The fileName parameter specifies the name of the file to be uploaded. The timeout parameter specifies how long the client should wait for the server to respond. The userHash parameter is optional and can be used to upload files to a specific user account. The function returns the URL of the uploaded file or an error if the upload failed.
func UploadToLitterBox ¶
func UploadToLitterBox(fileBuffer *bytes.Buffer, fileName string, duration string, timeout time.Duration) (string, error)
UploadToLitterBox uploads a file from a bytes.Buffer to LitterBox. The fileName parameter specifies the name of the file to be uploaded. The duration parameter specifies how long the file should be stored on the server, Options: '1h', '12h', '24h', '72h', '1w'. The timeout parameter specifies how long the client should wait for the server to respond.
Types ¶
This section is empty.