Uploaded image is not showing up on the edit screen

Uploaded image is not showing up on the edit screen

kaustubh.agrawal2000kaustubh.agrawal2000 Posts: 88Questions: 39Answers: 2

Hello,
I am using file upload function of datatable editor,
The image is getting uploaded properly but when editing the row, that image is not showing up on the popup... as in the example.

I tried providing static image url as well but still not showing up.
Kindly help...

steps to see actual working..

Go to gadhiya.in
Login
   - UNAME: kaustubh.agrawal2012@gmail.com
   - PWD : 12345678
goto: https://gadhiya.in/receipt
Edit the record which has, view upload image button, editor popup will show up, the image is not showing on that popup...

Target Src code
http://gadhiya.in/web/js/receipt.js

{
                  label: "Image",
                  name: "image",
                  type: "upload",
                  display: function ( id ) {
                    editor.field('uploaded_image').val(editor.file( 'image', id ).filename);    
                      return '<img src="'+ editor.file( 'image', id ).web_path +'"/>';
                  },
                  noImageText: 'No image'
},

Target API response
http://gadhiya.in/api/receipt

uploaded_image: "fe03e30acaf4e632bd26516870209fdd.jpg",

Answers

  • kaustubh.agrawal2000kaustubh.agrawal2000 Posts: 88Questions: 39Answers: 2

    UPDATE..

    I figured out why the image was not being shown on editor popup and updated the code accordingly .. and now I can see the image...

    this brings me to another question...

    can I do something when user clicks on CLEAR Button..?? is there any callbacks provided for the clear event ??

    Regards
    Kaustubh

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    No - there is no callback from that button. What do you want to do when the user clicks on it?

    Allan

  • kaustubh.agrawal2000kaustubh.agrawal2000 Posts: 88Questions: 39Answers: 2

    @allan

    Want to update some hidden form fields when the image is unselected

This discussion has been closed.