diff --git a/client/js/controllers/post_upload_controller.js b/client/js/controllers/post_upload_controller.js index 2ad02afc..4c4ec68f 100644 --- a/client/js/controllers/post_upload_controller.js +++ b/client/js/controllers/post_upload_controller.js @@ -175,9 +175,11 @@ class PostUploadController { // if uploadable.source is ever going to be a valid field (e.g when setting source directly in the upload window) // you'll need to change the line below to `post.source = uploadable.source || uploadable.url;` if (uploadable.url) { + // For now, if the input is a URL, flmt will be same as creation date post.source = uploadable.url; + } else { + post.fileLastModifiedTime = uploadable.file.lastModified; } - post.fileLastModifiedTime = uploadable.file.lastModified; // The client already reads the data anyway, which is convenient return post; } } diff --git a/server/szurubooru/api/post_api.py b/server/szurubooru/api/post_api.py index 9262af56..86c2908c 100644 --- a/server/szurubooru/api/post_api.py +++ b/server/szurubooru/api/post_api.py @@ -89,7 +89,7 @@ def create_post( posts.update_post_flags(post, flags) if ctx.has_param("fileLastModifiedTime"): posts.update_post_file_last_modified_time( - post, ctx.get_as_param("file_last_modified_time") + post, ctx.get_param_as_int("fileLastModifiedTime") ) if ctx.has_file("thumbnail"): posts.update_post_thumbnail(post, ctx.get_file("thumbnail"))