diff --git a/src/frontend/app/indexation/indexation.component.html b/src/frontend/app/indexation/indexation.component.html
index cd0c72d916babfa6de1811e1d854f295cdead763..b3eb6709615fca453a9736203ad3f9382adee697 100644
--- a/src/frontend/app/indexation/indexation.component.html
+++ b/src/frontend/app/indexation/indexation.component.html
@@ -28,7 +28,7 @@
                 </ion-buttons>
                 <ion-item style="width: 100%;">
                     <ion-label position="floating" color="secondary">{{'lang.reference' | translate}}</ion-label>
-                    <ion-input placeholder="{{'lang.fileReference' | translate}}" matInput type="text" [maxlength]="64" [(ngModel)]="file.reference" [disabled]="!file.mainDocument"></ion-input>
+                    <ion-input placeholder="{{'lang.fileReference' | translate}}" matInput type="text" [maxlength]="53" [(ngModel)]="file.reference" [disabled]="!file.mainDocument"></ion-input>
                 </ion-item>
                 <ion-item style="width: 100%;">
                     <ion-label position="floating" color="secondary">{{'lang.subject' | translate}} *</ion-label>
diff --git a/src/frontend/app/indexation/indexation.component.ts b/src/frontend/app/indexation/indexation.component.ts
index 6e41077aa5581369b823bad07d1d4d0ea8841b0e..2b73170c71a1ab562b741bfc81fb29542ac29e30 100644
--- a/src/frontend/app/indexation/indexation.component.ts
+++ b/src/frontend/app/indexation/indexation.component.ts
@@ -289,7 +289,7 @@ export class IndexationComponent implements OnInit {
                 let filename = fileInput.target.files[index].name;
                 let file = {
                     title: filename.substr(0, filename.lastIndexOf('.')),
-                    reference: filename.substr(0, filename.lastIndexOf('.')),
+                    reference: filename.substr(0, filename.lastIndexOf('.')).substr(0, 53),
                     mainDocument: true,
                     content: ''
                 };
@@ -297,8 +297,8 @@ export class IndexationComponent implements OnInit {
                 reader.readAsArrayBuffer(fileInput.target.files[index]);
                 reader.onload = (value: any) => {
                     file.mainDocument = this.filesToUpload.length === 0;
-                    file.reference = this.filesToUpload.length === 0 ? file.reference : '',
-                        file.content = this.getBase64Document(value.target.result);
+                    file.reference = this.filesToUpload.length === 0 ? file.reference : '';
+                    file.content = this.getBase64Document(value.target.result);
                     this.filesToUpload.push(file);
                     if (this.filesToUpload.length === 1) {
                         setTimeout(() => {