Build: successful library and example compilation; merge file upload into unified example program; update CMakeLists.txt
This commit is contained in:
@ -35,6 +35,24 @@ PRIVATEBIN_API int create_paste(const char* server_url, const char* content,
|
||||
int open_discussion, char** paste_url,
|
||||
char** delete_token);
|
||||
|
||||
/**
|
||||
* Uploads a file to a PrivateBin server
|
||||
*
|
||||
* @param server_url The URL of the PrivateBin server
|
||||
* @param file_path The path to the file to upload
|
||||
* @param password Optional password for the paste (can be NULL)
|
||||
* @param expiration Expiration time ("5min", "10min", "1hour", "1day", "1week", "1month", "1year", "never")
|
||||
* @param burn_after_reading Set to 1 to enable burn after reading, 0 to disable
|
||||
* @param open_discussion Set to 1 to enable discussion, 0 to disable
|
||||
* @param paste_url Output parameter for the URL of the created paste
|
||||
* @param delete_token Output parameter for the deletion token
|
||||
* @return 0 on success, error code on failure
|
||||
*/
|
||||
PRIVATEBIN_API int upload_file(const char* server_url, const char* file_path,
|
||||
const char* password, const char* expiration,
|
||||
int burn_after_reading, int open_discussion,
|
||||
char** paste_url, char** delete_token);
|
||||
|
||||
/**
|
||||
* Retrieves a paste from a PrivateBin server
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user