mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Handle file transfer upload with memory body handler.
This commit is contained in:
parent
96bd60cc47
commit
1b32ed0316
1 changed files with 5 additions and 0 deletions
|
|
@ -293,6 +293,11 @@ static void linphone_chat_message_process_response_from_post_file(void *data, co
|
|||
/* create a user body handler to take care of the file and add the content disposition and content-type headers */
|
||||
if (msg->file_transfer_filepath != NULL) {
|
||||
first_part_bh=(belle_sip_body_handler_t *)belle_sip_file_body_handler_new(msg->file_transfer_filepath,NULL,msg);
|
||||
} else if (linphone_content_get_buffer(msg->file_transfer_information) != NULL) {
|
||||
first_part_bh=(belle_sip_body_handler_t *)belle_sip_memory_body_handler_new_from_buffer(
|
||||
linphone_content_get_buffer(msg->file_transfer_information),
|
||||
linphone_content_get_size(msg->file_transfer_information),
|
||||
NULL,msg);
|
||||
} else {
|
||||
first_part_bh=(belle_sip_body_handler_t *)belle_sip_user_body_handler_new(linphone_content_get_size(msg->file_transfer_information),NULL,NULL,linphone_chat_message_file_transfer_on_send_body,msg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue