Uploading file using the REST API

cancel
Showing results for 
Search instead for 
Did you mean: 
Nicolas_C
Member II

Uploading file using the REST API

Jump to solution

Hi, I want to upload files using the REST API via the Java Wrapper. Im basing my java code on this: https://docs.alfresco.com/content-services/latest/develop/oop-ext-points/rest-api-java-wrapper/#uplo...

My server is a Alfresco community 7.3. Im working with a maven project with Intellij.

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.

Here's the code:

File someFile = new File(filePath);
byte[] fileData = null;
try {
fileData = FileUtils.readFileToByteArray(someFile);
} catch (IOException e) {
LOGGER.info("Erreur a l'ouverture du fichier : {}", filePath + e);
}

 Here is the error: 

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)

1 Solution

Accepted Solutions
Nicolas_C
Member II

Re: Uploading file using the REST API

Jump to solution

You can forget this post. It was actually an OS limitation.

View solution in original post

1 Reply
Nicolas_C
Member II

Re: Uploading file using the REST API

Jump to solution

You can forget this post. It was actually an OS limitation.