I just wanted a simple file field, no filemanager so I started poking around, and I *think* I’ve found a workaround… but it does have a downside.
In my saef, I’m using the following code to output the file upload field:
<input type="file" name="field_id_2" value="{field_id_2}" id="upload_file" size="20" class="field" />
<input type="text" name="field_id_2_directory" value="1" />
“field_id_x” should be modified to match your file field ID, and the “field_id_x_directory” value should be updated to match your upload directory ID.
Downside is via the cp, EE will prepend the filename with the filedir shortname, eg { filedir_1 }myimage.jpg - but if you upload via the saef, you only get the filename stored in the db. this means while editing the entry via the cp, you get squat in your field, it appears to be empty - even though you have uploaded the file, and the filename is stored in the field.
I tried changing the field type to just a text input, and then upload a file but then EE falls over and displays an error when trying to upload the file via the saef:
Error Number: 1054
Unknown column 'field_id_2_directory' in 'field list'
UPDATE exp_channel_data SET channel_id = '1', field_id_2_directory = '1' WHERE `entry_id` = '9'
I should be able to create a file field from here, but doubt I will be able to share the code as I’ll need to blag Ellislab code to get it working.
Hopefully this might help some others get going though.
Edit: {filedir_x} renders on this forum?
http://ellislab.com/images/uploads/
Iain,