Is your feature request related to a problem? Please describe.
Some backend require not just params but some metadata that come with the files.
Like the Google Drive API. To upload a file to appDataFolder, I have to provide file name and parents (folder) as file's metadata
Ex:
{
parents: ['appDataFolder'],
name: 'backup.json',
},
Just like in this plugin
Is there any way to archive with current version. I'v look through the docs but there's seem nothing like that.
There is data option, i'v tried but it seem doesn't work :'(
Describe the solution you'd like
Have option to add metadata for file when upload
Something like this, maybe:
const options = {
url: `${fileUploadUrl}?uploadType=media`,
name: 'backup.db',
filePath: backupFileUrl,
fileDirectory: Directory.Documents,
headers: {
'Authorization': `Bearer ${this.accessToken}`,
},
metadata: {
name: 'backup.db',
parents: ['appDataFolder']
},
progress: true,
};
Http.uploadFile(options).then(res => {
...