Closed kickin6 closed 3 months ago
I pushed a commit in v2.5 branch, you can set save_name='../{api-key}/filename'
, it will return http://127.0.0.1:7866/outputs/{api-key}/filename-{seq}.{output_format}
, seq is used for multi image in one generate, from 0.
Thanks!
Is there an existing issue for this?
What would your feature do?
Make the
date_string
in thefilename
optional.https://github.com/mrhan1993/FooocusAPI/blob/2c19778064a36848cd5309894fcd4076c6c7b249/apis/utils/file_utils.py#L76-L69
My use case: I need to group output files by customer api-key
/outputs/images/{api-key}/files...
which makes it easier to put a front-end to list their files without having to scan all/outputs/date_string/{api-key}/
directories.In my frontend app, after api-key validation, I set the
save_name
parameter to the api_key:Proposed workflow
I propose a new environment variable
os.environ["FILENAME_WITH_DATE"]
or similar.Additional information
No response