Apologies if this has already been asked and answered, but I couldn't find any tangible example on how to actually do this.
All I'm trying to do is create a template in ExpressionEngine, and upload a small JPG file to a channel field that's set to a Channel Files field type.
As this post suggests, it should work the same as uploading to a regular File field type using the Channel Form tag, but it doesn't seem to be uploading the file. The code below works perfectly for the normal File field type for adding new entries:
{exp:channel:form channel='other_details'}
<input type='hidden' name='title' value='Some new title here.' />
<input type="hidden" name="custom_upload_hidden_file" value="">
<input type="hidden" name="custom_upload_hidden_dir" value="2">
<input type="hidden" name="custom_upload_directory" value="2">
<input type="file" name="custom_upload">
<input type='submit' value='Upload' />
{/exp:channel:form}
The file upload location is a location with ID 2, which is perfect, but I need to upload the file to a Channel Files field type, not a normal File field type. How do you achieve this?
Thank you in advance for any assistance!