I have 2 custom fields created for my downloads files, i see that the database is saving the records in the 'downloads_ccontent' table. Using the API is there way to post new values for these fields when creating a new download through the REST API?
I have tried a few variations of passing extra fields in the post data, and they do not seem to work.
IE: the "Fields" array below
$curl_post_data = array(
'category' => 2,
'author' => 1,
'title' => 'Test File Upload',
'description' => $file_desc,
'files' => array(
$filename => urlencode(file_get_contents($file_url)),
$filename2 => urlencode(file_get_contents($file_url2))
),
'version' => '2021.02.06',
'screenshots' => array(
'testname.jpg' => urlencode(file_get_contents('/local/directory/')),
'testname2.jpg' => urlencode(file_get_contents('/local/directory/'))
),
'fields' => array (
'field_1' => 'HERE IS THE DATA FOR FIELD 1',
'field_2' => 'HERE IS THE DATA FOR FIELD 2'
),
'prefix' => NULL,
'tags' => 'tag1, tag2, tag3',
'date' => NULL,
'ip_address' => NULL,
'locked' => 0,
'hidden' => 1,
'pinned' => 0,
'featured' => 0
);
Thanks! @Adriano Faria or @IPCommerceFan or @bfarber you all seem to have good API knowledge so i tagged you 😃