Topic: Issues uploading media to the warehouse
Hi,
We have created a pre-built form that uses the data_entry_helper class to send a single sample-occurrence pair across to the test warehouse that we have set up.
In that pre-built form, we use the data_entry_helper::file_box method, with the default settings (have also tried to use data_entry_helper::image_upload with 'fieldname' => 'occurrence:image' for the image options). The media files are correctly appearing in the Uploads folder on our local website, as it should based on the data_entry_helper code.
In the get_submission form, we have
$submission = data_entry_helper::build_sample_occurrence_submission($values);
$response = data_entry_helper::forward_post_to('occurrence', $submission);
return data_entry_helper::dump_errors($response);
as per the documentation. We have also tried with 'save' instead of 'occurrence'.
In general, we are able to record our occurrences correctly in the warehouse, but the media files won't transfer to the warehouse to be attached to the occurrence.
With the code as above, we get the following error message as well:
An error occurred when the data was submitted.
general_errors.Undefined index: id
Error occurred in D:\web sites\indicia-git\modules\indicia_svc_data\controllers\services\data.php at line 1290
Do you have any ideas regarding what the issue is and how we can solve it?