-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
register_tmp_file also for mtime #15012
register_tmp_file also for mtime #15012
Conversation
The timestamp is only added to keep the browser from displaying cached images. You can just cut it off. filename.split("?")[0] |
|
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' |
|
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 |
…ith-mtime register_tmp_file also for mtime
…p_file-also-with-mtime register_tmp_file also for mtime
Description
I've found in my extension
OutputPanel
's save button doesn't work, because of timestamp in filename. I doubledregister_tmp_file
function insidesave_pil_to_file
also for filename with timestampChecklist: