mirror of
				https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
				synced 2025-11-04 05:36:06 +00:00 
			
		
		
		
	added timestamp to download filename
This commit is contained in:
		@@ -85,7 +85,7 @@ async def client_token():
 | 
			
		||||
    data = jwt.encode(payload, key=key, headers=None, algorithm='RS256')
 | 
			
		||||
 | 
			
		||||
    response = StreamingResponse(iter([data]), media_type="text/plain")
 | 
			
		||||
    response.headers["Content-Disposition"] = "attachment; filename=client_token.tok"
 | 
			
		||||
    response.headers["Content-Disposition"] = f'attachment; filename=client_configuration_token_{datetime.now().strftime("%d-%m-%y-%H-%M-%S")}'
 | 
			
		||||
    return response
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user