Florence Thanks for posting your question in Microsoft Q&A. Yes, you can save a custom file name by appending the input filename {filename} (prefix or suffix) in the output file name like below:
@app.blob_trigger(arg_name="myblob", path="testtrigger/{filename}",
connection="AzureWebJobsStorage")
@app.blob_output(arg_name="outputblob", path="output/out1-{filename}",
connection="AzureWebJobsStorage")
def blob_trigger(myblob: func.InputStream, outputblob: func.Out[str]) -> None:
logging.info(f"Python blob trigger function processed blob"
f"Name: {myblob.name}"
f"Blob Size: {myblob.length} bytes")
outputblob.set("test values") //test purpose
I have tested the above code snippet in my python function and worked as expected. However, you cannot use a binding expression that is not defined in the trigger as metadata/properties in the output (unless another binding expression types such as Trigger file name, JSON payloads etc.). Check out Trigger file name doc which also has an example to use binding expressions/patterns that you can apply and refer to each trigger doc about properties and metadata.
I hope this helps and let me know if any questions or face any issues.