Merge branch 'staging' into preprod
This commit is contained in:
commit
c87429c89c
@ -39,19 +39,31 @@ type IMimeTypes = {
|
||||
const mimeTypesAccepted: { [key: string]: IMimeTypes } = {
|
||||
"application/pdf": {
|
||||
extension: "pdf",
|
||||
size: 41943040,
|
||||
size: 104857600, // 100MB
|
||||
},
|
||||
"image/jpeg": {
|
||||
extension: "jpeg",
|
||||
size: 41943040,
|
||||
size: 104857600, // 100MB
|
||||
},
|
||||
"image/png": {
|
||||
extension: "png",
|
||||
size: 41943040,
|
||||
size: 104857600, // 100MB
|
||||
},
|
||||
"image/jpg": {
|
||||
extension: "jpg",
|
||||
size: 41943040,
|
||||
size: 104857600, // 100MB
|
||||
},
|
||||
"text/csv": {
|
||||
extension: "csv",
|
||||
size: 104857600, // 100MB
|
||||
},
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
|
||||
extension: "xlsx",
|
||||
size: 104857600, // 100MB
|
||||
},
|
||||
"application/vnd.ms-excel": {
|
||||
extension: "xls",
|
||||
size: 104857600, // 100MB
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -28,9 +28,13 @@
|
||||
.file-container {
|
||||
max-width: 1000px;
|
||||
margin: auto;
|
||||
min-height: 700px;
|
||||
min-height: 600px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.unsuported-format {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
|
@ -89,11 +89,38 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
</div>
|
||||
)}
|
||||
<div className={classes["file-container"]}>
|
||||
<FilePreview
|
||||
href={this.state.fileBlob ? URL.createObjectURL(this.state.fileBlob) : ""}
|
||||
fileName={this.state.selectedFile.file_name}
|
||||
key={this.state.selectedFile.uid}
|
||||
/>
|
||||
{this.state.selectedFile.mimetype !== "text/csv" &&
|
||||
this.state.selectedFile.mimetype !==
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" &&
|
||||
this.state.selectedFile.mimetype !== "application/vnd.ms-excel" && (
|
||||
<FilePreview
|
||||
href={this.state.fileBlob ? URL.createObjectURL(this.state.fileBlob) : ""}
|
||||
fileName={this.state.selectedFile.file_name}
|
||||
key={this.state.selectedFile.uid}
|
||||
/>
|
||||
)}
|
||||
{this.state.selectedFile.mimetype === "text/csv" && (
|
||||
<div className={classes["unsuported-format"]}>
|
||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
||||
L'affichage de ce format de fichier n'est pas supporté.
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
{this.state.selectedFile.mimetype ===
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" && (
|
||||
<div className={classes["unsuported-format"]}>
|
||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
||||
L'affichage de ce format de fichier n'est pas supporté.
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
{this.state.selectedFile.mimetype === "application/vnd.ms-excel" && (
|
||||
<div className={classes["unsuported-format"]}>
|
||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.COLOR_GENERIC_BLACK}>
|
||||
L'affichage de ce format de fichier n'est pas supporté.
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{this.state.document.files.length > 1 && (
|
||||
<div
|
||||
|
Loading…
x
Reference in New Issue
Block a user