register_tmp_file also for mtime#15012
Merged
AUTOMATIC1111 merged 1 commit intoAUTOMATIC1111:devfrom Feb 26, 2024
Merged
Conversation
Collaborator
|
The timestamp is only added to keep the browser from displaying cached images. You can just cut it off. filename.split("?")[0] |
Contributor
Author
|
Collaborator
|
Question marks are removed from filenames. stable-diffusion-webui/modules/images.py Lines 319 to 339 in cf2772f If the timestamp is missing, split("?")[0] returns the whole string.
>>> filename = "image.png?123456789"
>>> filename.split("?")[0]
'image.png'
>>> filename = "image.png"
>>> filename.split("?")[0]
'image.png' |
Owner
|
|
Contributor
Author
|
I know it adds file into white list. I have a case when this tmp_file_set contains only file with no timestamp, and save image function (inside output panel) checks file with timestamp |
AUTOMATIC1111
approved these changes
Feb 26, 2024
AUTOMATIC1111
added a commit
that referenced
this pull request
Mar 2, 2024
…ith-mtime register_tmp_file also for mtime
ruchej
pushed a commit
to ruchej/stable-diffusion-webui
that referenced
this pull request
Sep 30, 2024
…p_file-also-with-mtime register_tmp_file also for mtime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I've found in my extension
OutputPanel's save button doesn't work, because of timestamp in filename. I doubledregister_tmp_filefunction insidesave_pil_to_filealso for filename with timestampChecklist: