title: How to delete the file after a `return FileResponse(file_path)`
body: <p>I'm using FastAPI to receive an image, process it and then return the image as a FileResponse.</p>
  <p>But the returned file is a temporary one that need to be deleted after the endpoint return it.</p>
  <pre class="lang-py prettyprint-override"><code>@app.post(&quot;/send&quot;)
  async def send(imagem_base64: str = Form(...)):
  
      # Convert to a Pillow image
      image = base64_to_image(imagem_base64)
  
      temp_file = tempfile.mkstemp(suffix = '.jpeg')
      image.save(temp_file, dpi=(600, 600), format='JPEG', subsampling=0, quality=85)
  
      return FileResponse(temp_file)
  
      # I need to remove my file after return it
      os.remove(temp_file)
  
  </code></pre>
  <p>How can I delete the file after return it ?</p>