Im struggling from few days with amazon s3 s3fs cors module. My goal is to add custom form field for image upload in ajaxed form. Whenever user click on specific button ajax form will be invoked and this ajaxed form will be a fieldset with different fields involving as well s3 image field. One issue is that s3fs is looking for field instance.
$form['custom_field'] = array(
'#type' => 's3fs_cors_upload',
This is simply not working at all. Field is visible, user can select image but upload button is not active. If I pass some options to the array like value callback and process upload button becomes active but this only leads to more issues as module is checking field instance for file system reference, it should be s3:// but it doesnt find anything and so on.Any hints how to tackle this?