I want to create a new record with an associated attachment which is based on a file in the file system. I've been trying to find how attachments are handled for a standard upload, but I don't understand what is going on.
I want to:
a) Create new record
b) Create a new attachment record and save
c) Copy a pre-existing file to the attachments file repository
d) Set the attachment field value on the record and save
I seem to be able to to all except c). where would I find the correct method for storing a file into the file repository (default upload dir)
I want to:
a) Create new record
b) Create a new attachment record and save
c) Copy a pre-existing file to the attachments file repository
d) Set the attachment field value on the record and save
I seem to be able to to all except c). where would I find the correct method for storing a file into the file repository (default upload dir)
Comment