Function file_data::construct()

← Back to Class file_data



Module urlClass file_data → construct()

Description

The constructor. Create an instance of class file_data and create MIME file data

file_data::construct(filename)


Parameters


Return Value


Usage Example

params = {
    "file": file_data("data.txt")   ' Upload a file
}
 
response = url.post("https://faruq.id/misc/post.php", params, true)
 
if response.code == 200
    writeln("Upload complete!")
else
    writeln(response.error_string)
endif