@@ -1575,8 +1575,8 @@ int psync_upload_data(psync_folderid_t folderid, const char *remote_filename, co
1575
1575
return psync_upload_params (params , ARRAY_SIZE (params ), data , length , fileid );
1576
1576
}
1577
1577
1578
- int psync_upload_data_as (const char * remote_path , const void * data , size_t length , psync_fileid_t * fileid ){
1579
- binparam params []= {P_STR ("auth" , psync_my_auth ), P_STR ("path" , remote_path ), P_BOOL ("nopartial" , 1 )};
1578
+ int psync_upload_data_as (const char * remote_path , const char * remote_filename , const void * data , size_t length , psync_fileid_t * fileid ){
1579
+ binparam params []= {P_STR ("auth" , psync_my_auth ), P_STR ("path" , remote_path ), P_STR ( "filename" , remote_filename ), P_BOOL ("nopartial" , 1 )};
1580
1580
return psync_upload_params (params , ARRAY_SIZE (params ), data , length , fileid );
1581
1581
}
1582
1582
@@ -1630,13 +1630,13 @@ int psync_upload_file(psync_folderid_t folderid, const char *remote_filename, co
1630
1630
return ret ;
1631
1631
}
1632
1632
1633
- int psync_upload_file_as (const char * remote_path , const char * local_path , psync_fileid_t * fileid ){
1633
+ int psync_upload_file_as (const char * remote_path , const char * remote_filename , const char * local_path , psync_fileid_t * fileid ){
1634
1634
char * data ;
1635
1635
size_t length ;
1636
1636
int ret ;
1637
1637
if (psync_load_file (local_path , & data , & length ))
1638
1638
return -2 ;
1639
- ret = psync_upload_data_as (remote_path , data , length , fileid );
1639
+ ret = psync_upload_data_as (remote_path , remote_filename , data , length , fileid );
1640
1640
psync_free (data );
1641
1641
return ret ;
1642
1642
}
0 commit comments