Upload and extract function
Allows you to send a file to a file host, extract the download link and, if required, manage the manual deletion of the file.
π§ Function overviewβ
function upload_to_host(request_data, response_format, link_extraction = [], affix = [], manage_file = []) {
// ...
}
π¦ Parameters explainedβ
π request_data
β
The base configuration for the HTTP request to the host:
request_data[0]
β Endpoint URLrequest_data[1]
β HTTP method ("POST"
,"GET"
β¦)request_data[2]
β Body of the request (e.g. aFormData
object)request_data[3]
β Optional headers (e.g.{ "Content-Type": "application/json" }
)