I want to fill a form on a webpage to send some files via the command line instead of using the browser. I found cURL could do that for me but I’m not sure how. Besides that, I found out the "authenticity_token" changes for every request. How would I successfully authenticate and post my files?
I stripped down the html code to present only the inputs, see below. Thanks for having a look.
<form action="https://XXXXXXXX.com/aspera/faspex/test/dropbox_submissions" class="well form-horizontal form-horizontal-small-labels" id="send" method="post"><div style="margin:0;padding:0;display:inline"><input name="authenticity_token" type="hidden" value="cU/zhZKnbjk90v57Phmdgewq97lKclj63MtzfCHhEqc=" /></div>
<input id="dropbox_id" name="dropbox[id]" type="hidden" value="738" />
<input id="passcode" name="passcode" type="hidden" value="1738d1bc02755019655dd424Xf2717f1c8a7c579" />
<input id="delivery_title" maxlength="100" name="delivery[title]" size="100" type="text" value="" />
<input id="fileupload" multiple="multiple" name="file" type="file" />
<input id="delivery_source_paths_list" name="delivery[source_paths_list]" type="hidden" />
<input class="btn large primary" data-prompt_password="true" disabled="disabled" id="send_button" name="commit" type="submit" value="Send Package" />
<label>Passphrase:</label>
<input autocomplete="off" id="password" type="password" />
<label>Confirmation:</label>
<input autocomplete="off" id="password_confirmation" type="password" />
</form>