cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading file using the REST API

Nicolas_C
Champ in-the-making
Champ in-the-making

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 ACCEPTED ANSWER

Nicolas_C
Champ in-the-making
Champ in-the-making

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

View answer in original post

1 REPLY 1

Nicolas_C
Champ in-the-making
Champ in-the-making

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