<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Uploading file using the REST API in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/uploading-file-using-the-rest-api/m-p/125315#M34195</link>
    <description>&lt;P&gt;Hi, I want to upload files using the REST API via the Java Wrapper. Im basing my java code on this:&amp;nbsp;&lt;A href="https://docs.alfresco.com/content-services/latest/develop/oop-ext-points/rest-api-java-wrapper/#uploadfile" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/content-services/latest/develop/oop-ext-points/rest-api-java-wrapper/#uploadfile&lt;/A&gt;&lt;/P&gt;&lt;P&gt;My server is a Alfresco community 7.3. Im working with a maven project with Intellij.&lt;/P&gt;&lt;P&gt;I can upload small files and it works well. My problem is with files biggers than 50mb. I get an exception everytime telling me the file exceeds the authorized limit. I am very confused by this. I was wondering if anyone could help me with this.&lt;/P&gt;&lt;P&gt;Here's the code:&lt;/P&gt;&lt;PRE&gt;File someFile = &lt;SPAN&gt;new &lt;/SPAN&gt;File(filePath)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;byte&lt;/SPAN&gt;[] fileData = &lt;SPAN&gt;null;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;try &lt;/SPAN&gt;{&lt;BR /&gt;    fileData = FileUtils.&lt;SPAN&gt;readFileToByteArray&lt;/SPAN&gt;(someFile)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;} &lt;SPAN&gt;catch &lt;/SPAN&gt;(IOException e) {&lt;BR /&gt;    &lt;SPAN&gt;LOGGER&lt;/SPAN&gt;.info(&lt;SPAN&gt;"Erreur a l'ouverture du fichier : {}"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;filePath + e)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Here is the error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;java.io.FileNotFoundException: Z:\Sites\bmassicotte-poly\documentLibrary\Doublons\Documents WSP\2020-11-13 Données essai #31 A-2019\_Explication des données disponibles.avi (Impossible d’enregistrer le fichier car sa taille dépasse la limite autorisée)&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2022 16:53:25 GMT</pubDate>
    <dc:creator>Nicolas_C</dc:creator>
    <dc:date>2022-12-01T16:53:25Z</dc:date>
    <item>
      <title>Uploading file using the REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/uploading-file-using-the-rest-api/m-p/125315#M34195</link>
      <description>&lt;P&gt;Hi, I want to upload files using the REST API via the Java Wrapper. Im basing my java code on this:&amp;nbsp;&lt;A href="https://docs.alfresco.com/content-services/latest/develop/oop-ext-points/rest-api-java-wrapper/#uploadfile" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/content-services/latest/develop/oop-ext-points/rest-api-java-wrapper/#uploadfile&lt;/A&gt;&lt;/P&gt;&lt;P&gt;My server is a Alfresco community 7.3. Im working with a maven project with Intellij.&lt;/P&gt;&lt;P&gt;I can upload small files and it works well. My problem is with files biggers than 50mb. I get an exception everytime telling me the file exceeds the authorized limit. I am very confused by this. I was wondering if anyone could help me with this.&lt;/P&gt;&lt;P&gt;Here's the code:&lt;/P&gt;&lt;PRE&gt;File someFile = &lt;SPAN&gt;new &lt;/SPAN&gt;File(filePath)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;byte&lt;/SPAN&gt;[] fileData = &lt;SPAN&gt;null;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;try &lt;/SPAN&gt;{&lt;BR /&gt;    fileData = FileUtils.&lt;SPAN&gt;readFileToByteArray&lt;/SPAN&gt;(someFile)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;} &lt;SPAN&gt;catch &lt;/SPAN&gt;(IOException e) {&lt;BR /&gt;    &lt;SPAN&gt;LOGGER&lt;/SPAN&gt;.info(&lt;SPAN&gt;"Erreur a l'ouverture du fichier : {}"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;filePath + e)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Here is the error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;java.io.FileNotFoundException: Z:\Sites\bmassicotte-poly\documentLibrary\Doublons\Documents WSP\2020-11-13 Données essai #31 A-2019\_Explication des données disponibles.avi (Impossible d’enregistrer le fichier car sa taille dépasse la limite autorisée)&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 16:53:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/uploading-file-using-the-rest-api/m-p/125315#M34195</guid>
      <dc:creator>Nicolas_C</dc:creator>
      <dc:date>2022-12-01T16:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading file using the REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/uploading-file-using-the-rest-api/m-p/125316#M34196</link>
      <description>&lt;P&gt;You can forget this post. It was actually an OS limitation.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 19:53:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/uploading-file-using-the-rest-api/m-p/125316#M34196</guid>
      <dc:creator>Nicolas_C</dc:creator>
      <dc:date>2022-12-01T19:53:26Z</dc:date>
    </item>
  </channel>
</rss>

