reps pdf upload directory restructure

This commit is contained in:
2023-10-04 14:28:56 +01:00
parent f78210c24c
commit 1f669a5efe
29 changed files with 503 additions and 670 deletions
+5 -7
View File
@@ -9,6 +9,11 @@ import { connect } from "react-redux";
import Dropzone, { useDropzone } from "react-dropzone";
import { uploadFiles } from "../../actions";
import { getContainers } from "../../actions/azurestorage";
import {
getFormCollectionByID,
getThumbnailIconByExtension,
bytesToSize,
} from "../utils";
const required = (errorMsg) => (value) =>
value || typeof value === "number" ? undefined : errorMsg;
@@ -119,13 +124,6 @@ const RenderFileUpload = (field) => {
</div>
));
function bytesToSize(bytes) {
var sizes = ["Bytes", "KB", "MB", "GB", "TB"];
if (bytes == 0) return "0 Byte";
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
return Math.round(bytes / Math.pow(1024, i), 2) + " " + sizes[i];
}
const getThumbnailIcon = (fileObj, fileType) => {
switch (fileType) {
case "text/html":