title: upload a file to tmp folder flask python
body: <p>I am trying to extract frames from gifs/videos that have been uploaded to the server through a post request. I have the code working to grab the file:</p>
  
  <pre><code>my_file = request.files['file']
  </code></pre>
  
  <p>however if that file is a gif or video I'm kind of stuck. The cv2 and Image package both require that the video or gif is stored in a file and you input the filename to grab the file, but that's not going to be possible as I'm not trying to store user data. So what I want to do is uppload it to a tmp folder, extract the frames then put it back, how could I go about doing that?</p>