Hi,
I want to allow a user to browse for a file and then upload that file into a database field.
What I have so far: I have set up a form where a user is required to enter a number of attributes in input boxes. The form enctype has been set to “mulipart/form-data” and I have a file type input where the user browses for the file they want to upload.
I then have a second page that is called when the user submits the first page. I have set up an SQL insert statement that populates the database with the attributes entered by the user. What I now need to do is to rename the uploaded file based on some of the entered attributes and insert into the database.
I have looked at the cffile tag but have not had any success with it so far. Does anyone have any tips and pointers for doing this?
The file I want to insert into the database is #Form.File# and I am using MySQL with a BLOB field named Upload_Object.
Thanks in advance.
Dan
I want to allow a user to browse for a file and then upload that file into a database field.
What I have so far: I have set up a form where a user is required to enter a number of attributes in input boxes. The form enctype has been set to “mulipart/form-data” and I have a file type input where the user browses for the file they want to upload.
I then have a second page that is called when the user submits the first page. I have set up an SQL insert statement that populates the database with the attributes entered by the user. What I now need to do is to rename the uploaded file based on some of the entered attributes and insert into the database.
I have looked at the cffile tag but have not had any success with it so far. Does anyone have any tips and pointers for doing this?
The file I want to insert into the database is #Form.File# and I am using MySQL with a BLOB field named Upload_Object.
Thanks in advance.
Dan