Attachment field
Autor: Heba S.
Visitado 2261,
Followers 1,
Compartido 0
Hi. I am creating an email form and one of the fields is a picture attachemnt i have connected the form to a database table and all the fileds are saved in that table even the picture but it appears as text only ( the picture name ) i have put the field typr longblob but also the pictures are not showing. is there any solution?
Publicado en
Hello Heba,
Did you allow WebSite X5 to create the database table for you, or did you create the table yourself?
Are you using the option 'Send data to a Database' or are you using the option 'Send data to a file' and then using your own script to connect to the database?
http://help.websitex5.com/en/v12/pro/index.html?ins_form.htm
I recommend allowing WebSite X5 to set up the database table for you.
Also ensure that you have allowed the image file extensions as an option when setting up your Email Form Object (Attachment File in Field Type).
Kind regards,
Paul
Autor
i allowed Website X5 to create the database table for me and i have chosen send data to database also i have put the extensions
Autor
but still not working
Hello Heba,
Please check the folder permissions to have writing attributes and then test again the function.
Take in consideration on the Database it will be only be written the name of the file which then can be found in the main hosting server folder.
The file won't be saved in the database but on the hosting space.
Many thanks!
Autor
thank you. i will till you the case. i have written code to read the data from the database table and display it on another page. The database table is originally filled through a form.I have checked all the permission writing permission is there.
Hello Heba,
Did you verify if the attachments have been uploaded in the main folder of your hosting space?
This function saves the file in the main folder where you exported the project online.
Many thanks!
Autor
yes it is there in the hosting server in the localhost folder
Hello Heba,
in this case you can take the name of the file from the database with your custom code and then take the file with this name from the main folder on the hosting space and display it.
Unfortunately I cannot help you with custom code since the support is only available for the functions of the program.
Many thanks!