Browse Source

Revert to S3 endpoint

Vishnu Mohandas 4 years ago
parent
commit
f04a0a4505
1 changed files with 16 additions and 16 deletions
  1. 16 16
      lib/models/file.dart

+ 16 - 16
lib/models/file.dart

@@ -99,14 +99,14 @@ class File {
   }
   }
 
 
   String getDownloadUrl() {
   String getDownloadUrl() {
-    if (kDebugMode) {
-      return Configuration.instance.getHttpEndpoint() +
-          "/files/download/" +
-          uploadedFileID.toString();
-    } else {
-      return "https://files.ente.workers.dev/?fileID=" +
-          uploadedFileID.toString();
-    }
+    // if (kDebugMode) {
+    return Configuration.instance.getHttpEndpoint() +
+        "/files/download/" +
+        uploadedFileID.toString();
+    // } else {
+    //   return "https://files.ente.workers.dev/?fileID=" +
+    //       uploadedFileID.toString();
+    // }
   }
   }
 
 
   // Passing token within the URL due to https://github.com/flutter/flutter/issues/16466
   // Passing token within the URL due to https://github.com/flutter/flutter/issues/16466
@@ -120,14 +120,14 @@ class File {
   }
   }
 
 
   String getThumbnailUrl() {
   String getThumbnailUrl() {
-    if (kDebugMode) {
-      return Configuration.instance.getHttpEndpoint() +
-          "/files/preview/" +
-          uploadedFileID.toString();
-    } else {
-      return "https://thumbnails.ente.workers.dev/?fileID=" +
-          uploadedFileID.toString();
-    }
+    // if (!kDebugMode) {
+    return Configuration.instance.getHttpEndpoint() +
+        "/files/preview/" +
+        uploadedFileID.toString();
+    // } else {
+    //   return "https://thumbnails.ente.workers.dev/?fileID=" +
+    //       uploadedFileID.toString();
+    // }
   }
   }
 
 
   @override
   @override