I have a content type with a machine name of "video" and I created a module called "df". I want to add a separate form to the content type (above or below the edit fields) that does a direct post to Amazon S3 using the S3BrowserUpload object from the AWS SDK. The steps I am trying to accomplish are:
- Create additional upload form on "video" content type.
- User enters information and specifies a file in the S3 upload form.
- User clicks Save for the Add Content Type page.
- Ajax fires the Amazon S3 POST form to upload the video file and handles the response to store the file's key path in a hidden field.
- The normal drupal add content type fields are then posted back to the drupal site and processed. It would also have access to the hidden field that had been populated with Ajax.
I am new to Drupal forms so any assistance in integrating S3BrowserUpload with Drupal's forms API in my custom module to accomplish the steps above would be greatly appreciated.