Hello everyone,

I have recently been writing a program which connects to a server and based on some parameters it generates a pdf document. What I want to do next is to connect to different server with a username and password and upload the pdf document to a specific URL automatically.

The URL in question has a 'drag and drop' interface as well as a button which allows the user to browse files on their computer. Since I am trying to automate the process, I'm not sure how I should get my program to interact with it.

Opening up the webpage in question and having a look at the HTML, I've got this:
HTML Code:
<form method="POST" class="plugin_attachments_uploadform aui hidden" action="/pages/plugins/attachments/doattachfile.action?pageId=41614297" enctype="multipart/form-data">
                        <input type="hidden" name="atl_token" value="70161da7e8e861722c6268829f3198cca035176c">
                    <div class="field-group">
                        <label>Upload file</label>
                        <input type="file" name="file_0" size="30">
                    </div>
                    <div class="field-group">
                        <label>File description</label>
                        <input type="text" class="blank-search text" name="comment_0" size="20" placeholder="Comment" >
                        <input type="hidden" name="labels" value="$macroParams.labels"/>
                    </div>
                    <div class="field-group">
                        <input type="submit" class="submit aui-button" name="confirm" value="Upload">
                    </div>
                    <iframe class="plugin_attachments_uploadiframe hidden" name="QweTMaKTP0ESIH8EkKNXZsvTjav3usxDvsHyryafq5vOEVeod6uC5LkkrXIF84uV" src=""></iframe>
                </form>
The problem is, I'm really not sure how I should automate this process... I would guess that I would need to write a class to handle the connection and then POST to the URL within the HTML form, but I have very little of an idea how I would go about that.

Cheers,
Swarvy