HTML5 Data Bindings Support Product Page
Not a problem
Cannot Echo Image
Reported 14 Jun 2014 06:16:33
1
has this problem
14 Jun 2014 06:16:33 Julio C posted:
Hello Teodor,I am trying to echo an image I saved in the database, but I am not getting the image on the webpage. The databinding for the image is {{ClientPhoto}}. Could you please tell me what I am doing wrong with the code below:
<th width="153" rowspan="4" scope="col"><img src="{{ClientPhoto}}" alt="" width="270" height="244" data-binding-src="{{ClientPhoto}}"/></th>
Replies
Replied 16 Jun 2014 08:06:09
16 Jun 2014 08:06:09 Teodor Kuduschiev replied:
Hello Julio,
The {{ClientPhoto}} binding returns what is stored in your database, for example: image_name.jpg
But if your image is located into a subfolder and this is not stored in the database you need to add it manually, like:
data-binding-src="folder_name/{{ClientPhoto}}"
The {{ClientPhoto}} binding returns what is stored in your database, for example: image_name.jpg
But if your image is located into a subfolder and this is not stored in the database you need to add it manually, like:
data-binding-src="folder_name/{{ClientPhoto}}"
Replied 17 Aug 2014 04:26:21
17 Aug 2014 04:26:21 Julio C replied:
It is not returning anything (under search field "Jane" or "John" ) -> behaviormanagementsystem.com/clientmedsmgmt.php
The database has the image. What do you think I am doing wrong?
The database has the image. What do you think I am doing wrong?
Replied 20 Aug 2014 16:29:36
20 Aug 2014 16:29:36 Teodor Kuduschiev replied:
Sorry but i don't see a dynamic image on this page..
Replied 21 Aug 2014 04:12:28
21 Aug 2014 04:12:28 Julio C replied:
That's the point. The image is in the database but the script is returning " " instead of the image.
Replied 21 Aug 2014 10:06:42
21 Aug 2014 10:06:42 Teodor Kuduschiev replied:
What exactly is stored in your database as a client photo? Your data source returns this: "ClientPhoto":null
behaviormanagementsystem.com/dmxDatabaseSources/ClientInfoDataSource.php?search=j&limit=25&callback=jQuery111105120912830966744_1408615487276&_=1408615487286
behaviormanagementsystem.com/dmxDatabaseSources/ClientInfoDataSource.php?search=j&limit=25&callback=jQuery111105120912830966744_1408615487276&_=1408615487286
Replied 22 Aug 2014 23:13:45
22 Aug 2014 23:13:45 Julio C replied:
I made Jpeg graphics as test photos and stored them as mediumblob.
The phpMyAdmin shows all the images when I browse the data, and when I click on the images the browser shows the images with full descriptions including image size.
But you are right. When I do "test source" with DMXzone databindings, I get "null" for image. I do not know where the misconfiguration could be.
The phpMyAdmin shows all the images when I browse the data, and when I click on the images the browser shows the images with full descriptions including image size.
But you are right. When I do "test source" with DMXzone databindings, I get "null" for image. I do not know where the misconfiguration could be.
Replied 25 Aug 2014 13:57:11
25 Aug 2014 13:57:11 Teodor Kuduschiev replied:
What exactly is the type of the field that stores your images?
Replied 26 Aug 2014 05:05:03
26 Aug 2014 05:05:03 Julio C replied:
type=mediumblob
null=no
default=none
null=no
default=none
Replied 27 Aug 2014 10:59:33
27 Aug 2014 10:59:33 George Petrov replied:
Hi Julio,
You can not stare an image as blob in the database and just display it on a image tag.
You should just have the image on a folder on your server and store its filename in the database in a simple text filed.
Then it will work.
Greetings,
George
You can not stare an image as blob in the database and just display it on a image tag.
You should just have the image on a folder on your server and store its filename in the database in a simple text filed.
Then it will work.
Greetings,
George
Replied 29 Aug 2014 02:59:59
29 Aug 2014 02:59:59 Julio C replied:
Hi George,
The information needs to be contained in one single file, in this case, the database file, for security and privacy requirements. I cannot put the images on a folder. That's not an option.
The information needs to be contained in one single file, in this case, the database file, for security and privacy requirements. I cannot put the images on a folder. That's not an option.
Replied 08 Sep 2014 03:58:12
08 Sep 2014 03:58:12 Julio C replied:
Hi George,
Is not possible with the DMXzone databindings script to do what I am trying to do?
Is not possible with the DMXzone databindings script to do what I am trying to do?
Replied 08 Sep 2014 07:21:46
08 Sep 2014 07:21:46 Teodor Kuduschiev replied:
Hello Julio,
As George explained in the last post - You should just have the image on a folder on your server and store its filename in the database in a simple text filed.
That's how usually people work with dynamic images actually. There are other ways to protect files/images on your server.
As George explained in the last post - You should just have the image on a folder on your server and store its filename in the database in a simple text filed.
That's how usually people work with dynamic images actually. There are other ways to protect files/images on your server.
Replied 09 Sep 2014 04:39:10
09 Sep 2014 04:39:10 Julio C replied:
Hello Teodor,
The user of the script would be average office personnel. When they have to delete a record, all information including the images must be deleted simultaneously. Thus, the need to have the images stored in the database. I understand clearly what you and George are saying, but I cannot use that approach. Any suggestions?
The user of the script would be average office personnel. When they have to delete a record, all information including the images must be deleted simultaneously. Thus, the need to have the images stored in the database. I understand clearly what you and George are saying, but I cannot use that approach. Any suggestions?
Replied 09 Sep 2014 07:05:13
09 Sep 2014 07:05:13 Teodor Kuduschiev replied:
No, unfortunately this is the only way to use dynamic images.