Note that there are some explanatory texts on larger screens.

plurals
  1. POBlob image from database to meta og:image
    primarykey
    data
    text
    <p>have a medium blob data type on my database, it is storing pictures with gif,jpg,png,bmp types.</p> <p>I am working on a JSF web project and I can retrieve the blob with no problem.</p> <p>I am trying to retrieve the blob data from my database and try to insert it in a open graph image, this is for my facebook share functionality.</p> <pre><code>&lt;meta property="og:image" content="blob from db image here"/&gt; </code></pre> <p>But i am lost and i am not sure what to do, I don't think converting the blob to a base64 data using javascript is possible also.</p> <p>Anyone can point me out to the right direction?</p> <p><strong>UPDATED</strong></p> <p>i guess converting blob to base64 data seems possible.</p> <p>here's what i did:</p> <pre><code>&lt;h:head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;script&gt; var base64; base64 = '#{testController.RenderLogo(item.logo)}'; $('head').append('&lt;meta property="og:image" content="data:image/png;base64,'+base64+'"/&gt;'); &lt;/script&gt; &lt;/h:head&gt; </code></pre> <p>RenderLogo method:</p> <pre><code>public String RenderLogo(byte[] rawLogo) { String base64String = Base64.encodeBase64String(rawLogo); return base64String; } </code></pre> <p>it works on some sharing site like ShareThis, but when sharing through facebook or twitter it gives me a <code>414 Request-URI Too Large</code></p> <p>any suggestions? :c</p> <p>btw, i am using <a href="http://www.sharethis.com/" rel="nofollow">ShareThis</a> in sharing through facebook / twitter.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload