Send the correct title with an HEIC image
This commit is contained in:
parent
5639f3739a
commit
4f7fc1f3a0
1 changed files with 5 additions and 4 deletions
|
@ -201,14 +201,15 @@ class PhotoSyncManager {
|
|||
}
|
||||
|
||||
Future<Photo> _uploadFile(Photo localPhoto) async {
|
||||
var title = extension(localPhoto.title) == ".HEIC"
|
||||
? basenameWithoutExtension(localPhoto.title) + ".JPG"
|
||||
: localPhoto.title;
|
||||
var formData = FormData.fromMap({
|
||||
"file": MultipartFile.fromBytes((await localPhoto.getBytes()),
|
||||
filename: localPhoto.title),
|
||||
filename: title),
|
||||
"deviceFileID": localPhoto.localId,
|
||||
"deviceFolder": localPhoto.deviceFolder,
|
||||
"title": extension(localPhoto.title) == ".HEIC"
|
||||
? basenameWithoutExtension(localPhoto.title) + ".JPG"
|
||||
: localPhoto.title,
|
||||
"title": title,
|
||||
"createTimestamp": localPhoto.createTimestamp,
|
||||
});
|
||||
return _dio
|
||||
|
|
Loading…
Add table
Reference in a new issue