URGENT: View image sent from Contact Form in Database
Autor: Hongyu L.
Visitado 1276,
Followers 2,
Compartido 0
Hi, I am using Evo 2020.2.
I created a contact form whereby users can upload images in the format of:
jpg,png,jpeg,heic
It is then stored in the database as longblob.
However, I am unable to view the images uploaded via X5's contact form using tools like MySQL Workbench and RazorSQL.
The other images stored in the database which are not uploaded using X5's contact form can be viewed normally.
Please help me with this, thank you and appreciate it.
Publicado en
Hello Hongyu,
Did you use WebSite X5's own Contact Form Object? If so then be aware that WebSite X5 does not store images (attachments) in the database. You will find the uploaded images in the root folder of your WebSite X5 project on the server.
Kind regards,
Paul
Search the WebSite X5 Help Center
Autor
I passed all my website test (php7..database connection..)
Autor
Dear Paul,
Yup, I used X5's own contact form object. I see, so I look for the root folder to retrieve the submitted images? May I know how to access the root folder to retrieve the images?
Thank you a lot!
You can download the images using any FTP client, such as File Zilla:
https://filezilla-project.org/
Or you can use the built-in FTP engine in WebSite X5 (Step 5 - Website Export to Internet):
First click on the icon highlighted in red, which will allow you to browse the files and folders on your server.
Then, click once on the file you wish to download (to give it focus), then click on the icon highlighted in yellow, to download that particular file from the server.
Autor
Dear Paul,
Thank you for your quick response, much appreciated.
I managed to download the submitted images.
However, for another server, I am only able to upload using WinSCP after I have 'expored website to disk' in Step 5.
Can I still use the built-in FTP engine in WebSite X5 to retrieve the file?
If no, how can I retrieve it in this case?
Have a great day.
Yes, you should still be able to use the built-in FTP engine to do that, Hongyu.
But if you are uploading using WinSCP then there is no reason why you couldn't download using WinSCP also:
https://winscp.net/eng/docs/task_download
Autor
Dear Paul,
I managed to locate the submitted images in the WinSCP as well, thank you!
Can I check if I can automatically store the submitted images in a designated folder (such as admin, analytics, blogs..etc) inside the root folder? It would be easier to keep track and manage the submitted images.
If not, are there ways in which you recommend to better organize the submitted images?
Thank you!
It's not possible to 'automatically' move the submitted images to another folder on the server. It's fine to do this manually, but avoid placing the images in one of WebSite X5's own folders (such as the ones you mentioned). It would be better to create a new folder (or multiple folders) in which to store the images.
If you have programming skills then you might like to look into creating a cron script which would organise the images for you based on the criteria you specify:
https://en.wikipedia.org/wiki/Cron
This is beyond the scope of WebSite X5 though.