Questions Tagged With fileuploadhttps://answers.axonivy.com/tags/fileupload/?type=rss&user=markusinhoquestions tagged <span class="tag">fileupload</span>enThu, 11 Oct 2018 11:00:01 -0400How can i save bytearrays via the entityclass in a database?https://answers.axonivy.com/questions/3478/how-can-i-save-bytearrays-via-the-entityclass-in-a-database<p>Hello,</p> <p>I am trying to set up an entityclass with a postgres server. I need this database to store some images i upload with the primefaces <code>&amp;lt; p:fileUpload/&gt;</code> tag. With this tag the images are uploaded as a <code>UploadedFile</code>, now I can access the contents via <code>getContents()</code> and I will get the image as a Bytearray (byte[] in Java) . </p> <p>Now I need to know how can i save this Byte Array via the entityclasses in my postgres database. Postgres allows the datatype <code>bytea</code> for a column for this datatype, but if I add Bytearray as a type for the column in the entityclass AxonIvy throws this error: <code>The field type 'Binary' does not support persistence</code>. </p> <p>So my question is:<br> Is there any possibility i can save bytearray or blobs on my postgres server via the entity class?<br> What are all the classes which <strong>support</strong> <em>persistence</em>?</p> <p>Thanks</p>markusinhoThu, 11 Oct 2018 11:00:01 -0400https://answers.axonivy.com/questions/3478/how-can-i-save-bytearrays-via-the-entityclass-in-a-databasefileuploadpersistencedatabase