Merge pull request #237 from ente-io/switch_update_endpoint
Switch to new file/update endpoint
This commit is contained in:
commit
5303ce152c
2 changed files with 5 additions and 3 deletions
|
@ -231,7 +231,9 @@ class LocalSyncService {
|
|||
updatedFiles.removeWhere((file) => editedFileIDs.contains(file.localID));
|
||||
updatedFiles
|
||||
.removeWhere((file) => downloadedFileIDs.contains(file.localID));
|
||||
_logger.info(updatedFiles.length.toString() + " files were updated.");
|
||||
if (updatedFiles.isNotEmpty) {
|
||||
_logger.info(updatedFiles.length.toString() + " local files were updated.");
|
||||
}
|
||||
for (final file in updatedFiles) {
|
||||
await _db.updateUploadedFile(
|
||||
file.localID,
|
||||
|
|
|
@ -556,8 +556,8 @@ class FileUploader {
|
|||
}
|
||||
};
|
||||
try {
|
||||
final response = await _dio.post(
|
||||
Configuration.instance.getHttpEndpoint() + "/files",
|
||||
final response = await _dio.put(
|
||||
Configuration.instance.getHttpEndpoint() + "/files/update",
|
||||
options: Options(
|
||||
headers: {"X-Auth-Token": Configuration.instance.getToken()}),
|
||||
data: request,
|
||||
|
|
Loading…
Add table
Reference in a new issue