1

I have list of thumbnails. I want to drag those images to the container. I want thumbnails to be changed to original pictures which are stored in the db.And I want to perform drag action (overlap)on those images which are dropped inside the container.

Below is the code snippet Here i am using dragging function to send thumbnails

 "<script>
$(function() {
    $('#" + EncodeJavaScript(DraggableId) + "' ).draggable({
    helper: 'clone'

    });

});              
</script>"

Below is the code snippet where i am displaying the corresponding image

"<script>
$(function() {
    $('#" + EncodeJavaScript(DroppableId) + "' ).droppable({
        drop: function( event, ui ) {
           $( this ) this )

              .html('<img 
src=data:image/.png;base64,"+BinaryImg+" height=80px width=80px > ') '-> Here i am not getting actual image instead i got a blank image 
}
    });
});
</script>"
Karthik P B
  • 237
  • 1
  • 5
  • 19

1 Answers1

0

Outsystems doesn't store binary data as a base64 string. However there is a plugin available that can do conversions for base64. Generate a Base64 string out of your binary using the BinaryToBase64 Action and use this output instead of your local BinaryImg.

https://www.outsystems.com/forge/Component_Details.aspx?ProjectId=287

Also I think you have to change data:image/.png;base64 to data:image/png;base64 though I'm not sure.

Mark Baijens
  • 13,028
  • 11
  • 47
  • 73