Fixed upload for files shared to ente for backup
This commit is contained in:
parent
a6a52a29c4
commit
70526a4157
1 changed files with 10 additions and 6 deletions
|
@ -131,12 +131,16 @@ class File {
|
|||
}
|
||||
metadata["fileType"] = fileType.index;
|
||||
final asset = await getAsset();
|
||||
fileSubType = asset.subTypes;
|
||||
metadata["subType"] = fileSubType;
|
||||
if (fileType == FileType.video) {
|
||||
duration = asset.duration;
|
||||
metadata["duration"] = duration;
|
||||
} else {
|
||||
// asset can be null for files shared to app
|
||||
if (asset != null) {
|
||||
fileSubType = asset.subTypes;
|
||||
metadata["subType"] = fileSubType;
|
||||
if (fileType == FileType.video) {
|
||||
duration = asset.duration;
|
||||
metadata["duration"] = duration;
|
||||
}
|
||||
}
|
||||
if (fileType == FileType.image || fileType == FileType.livePhoto){
|
||||
exif = (await readExifFromFile(sourceFile)).toString();
|
||||
metadata["exif"] = exif;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue