Skip to content
Snippets Groups Projects
Commit b5d04275 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FIX #16504 TIME 0:15 fix reference data

parent a2def43d
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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(() => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment