0

I'm working on a program to automate uploading a file to a website. I'd like it to take some image file from the user, and then upload it to a specific website by clicking a Choose File button, selecting the file from disk, then pressing select. The HTML for the button looks like this:

<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
  <fieldset>
    <div>
      FILE: <input id="file" type="file" name="file">
    </div>
  </fieldset>
</form>

I'm very new to web programming, but from my understanding this sort of thing can be done with requests. How would I go about it?

gmuraleekrishna
  • 3,375
  • 1
  • 27
  • 45
Sakeeb Hossain
  • 662
  • 5
  • 19
  • Do you want use requests send a file? – Remi Guan Jan 05 '16 at 05:55
  • Well, the website I'm working with basically takes an image file, modifies it, and then allows the user to download the modified version. It has something like this to upload the file with: http://puu.sh/miAvM/2522c0dadf.png So if that qualifies as sending a file, then yes. – Sakeeb Hossain Jan 05 '16 at 06:06
  • Yes I know, then please check that duplicate question. – Remi Guan Jan 05 '16 at 06:08

0 Answers0