initial commit

This commit is contained in:
2025-11-11 14:55:29 +07:00
commit 7c17aa7843
2490 changed files with 606138 additions and 0 deletions

View File

@@ -0,0 +1,137 @@
/**
* Fileuploader
* Copyright (c) 2019 Innostudio.de
* Website: https://innostudio.de/fileuploader/
* Version: 2.2 (23-Nov-2019)
* License: https://innostudio.de/fileuploader/documentation/#license
*/
@font-face {
font-family: 'font-fileuploader';
src: url('font-fileuploader.ttf?yhe2ig') format('truetype'),
url('font-fileuploader.woff?yhe2ig') format('woff'),
url('font-fileuploader.svg?yhe2ig#font-fileuploader') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="fileuploader-icon-"], [class*=" fileuploader-icon-"] {
display: inline-block;
font-family: 'font-fileuploader' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.fileuploader-icon-main:before {
content: "\e900";
}
.fileuploader-icon-alert:before {
content: "\e901";
}
.fileuploader-icon-calendar:before {
content: "\e902";
}
.fileuploader-icon-camera:before {
content: "\e903";
}
.fileuploader-icon-success:before {
content: "\e904";
}
.fileuploader-icon-arrow-left:before {
content: "\e905";
}
.fileuploader-icon-arrow-right:before {
content: "\e906";
}
.fileuploader-icon-crop:before {
content: "\e908";
}
.fileuploader-icon-download:before {
content: "\e909";
}
.fileuploader-icon-edit:before {
content: "\e90a";
}
.fileuploader-icon-external:before {
content: "\e90b";
}
.fileuploader-icon-eye:before {
content: "\e90c";
}
.fileuploader-icon-file:before {
content: "\e90d";
}
.fileuploader-icon-video:before {
content: "\e90f";
}
.fileuploader-icon-folder:before {
content: "\e910";
}
.fileuploader-icon-help:before {
content: "\e911";
}
.fileuploader-icon-image:before {
content: "\e912";
}
.fileuploader-icon-link:before {
content: "\e913";
}
.fileuploader-icon-message:before {
content: "\e914";
}
.fileuploader-icon-menu:before {
content: "\e915";
}
.fileuploader-icon-sort:before {
content: "\e916";
}
.fileuploader-icon-audio:before {
content: "\e917";
}
.fileuploader-icon-plus:before {
content: "\e918";
}
.fileuploader-icon-retry:before {
content: "\e919";
}
.fileuploader-icon-rotate:before {
content: "\e91a";
}
.fileuploader-icon-save:before {
content: "\e91b";
}
.fileuploader-icon-search:before {
content: "\e91c";
}
.fileuploader-icon-settings:before {
content: "\e91d";
}
.fileuploader-icon-share:before {
content: "\e91e";
}
.fileuploader-icon-deny:before {
content: "\e91f";
}
.fileuploader-icon-trash:before {
content: "\e920";
}
.fileuploader-icon-upload:before {
content: "\e921";
}
.fileuploader-icon-user:before {
content: "\e922";
}
.fileuploader-icon-remove:before {
content: "\e923";
}
.fileuploader-icon-zoom-in:before {
content: "\e924";
}
.fileuploader-icon-zoom-out:before {
content: "\e925";
}

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="font-fileuploader" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe900;" glyph-name="fileuploader" d="M966.587 540.441c-0.917 21.378-2.834 43.312-5.111 65.652-15.865 155.001-139.527 282.153-293.861 301.406-166.507 20.78-312.533-79.586-363.378-224.821-6.391 0.555-12.809 0.987-19.337 0.987-124.885 0-228.101-101.883-228.101-227.003v-56.633c0-30.981 27.004-56.208 57.927-56.208h1.14c30.896 0 54.484 26.56 54.484 57.525v44.69c-6.556 67.525 48.482 124.361 114.551 124.361 3.305 0 6.556-0.306 9.78-0.583l43.787 0.583c25.698-2.196 49.454 9.029 57.982 33.394l12.281 35.076c29.838 85.253 105.076 149.225 194.898 157.17 139.083 12.324 259.246-104.882 249.963-243.671l-0.192-11.92v-145.78h0.555c1.639-29.618 27.673-53.332 57.621-53.332h1.111c29.511 0 52.066 24.228 54.124 53.33h0.389v145.78l-0.612-0.002zM721.986 267.445l-171.895 171.132c-10.615 10.583-25.031 16.546-40.091 16.546s-29.451-5.963-40.094-16.546l-167.92-170.674c-22.144-22.044-22.144-57.76 0-79.81 22.142-22.060 58.037-22.060 80.181 0l73.237 74.903v-206.679c0-31.104 25.088-56.318 56.039-56.318h1.111c30.953 0 56.037 25.214 56.037 56.318v198.052l7.362-1.18 63.625-63.371c20.089-19.975 52.204-24.843 75.18-8.325 29.175 20.964 31.591 61.708 7.227 85.952z" />
<glyph unicode="&#xe901;" glyph-name="alert" d="M512 896c-260.267 0-469.333-209.067-469.333-469.333s209.067-469.333 469.333-469.333 469.333 209.067 469.333 469.333-209.067 469.333-469.333 469.333zM512 42.667c-213.333 0-384 170.667-384 384s170.667 384 384 384c213.333 0 384-170.667 384-384s-170.667-384-384-384zM512 640c-25.6 0-42.667-17.067-42.667-42.667v-170.667c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v170.667c0 25.6-17.067 42.667-42.667 42.667zM482.133 285.867c-8.533-8.533-12.8-17.067-12.8-29.867s4.267-21.333 12.8-29.867c8.533-8.533 17.067-12.8 29.867-12.8s21.333 4.267 29.867 12.8c8.533 8.533 12.8 21.333 12.8 29.867s-4.267 21.333-12.8 29.867c-17.067 17.067-42.667 17.067-59.733 0z" />
<glyph unicode="&#xe902;" glyph-name="calendar" d="M810.667 810.667h-85.333v42.667c0 25.6-17.067 42.667-42.667 42.667s-42.667-17.067-42.667-42.667v-42.667h-256v42.667c0 25.6-17.067 42.667-42.667 42.667s-42.667-17.067-42.667-42.667v-42.667h-85.333c-72.533 0-128-55.467-128-128v-597.333c0-72.533 55.467-128 128-128h597.333c72.533 0 128 55.467 128 128v597.333c0 72.533-55.467 128-128 128zM213.333 725.334h85.333v-42.667c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v42.667h256v-42.667c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v42.667h85.333c25.6 0 42.667-17.067 42.667-42.667v-128h-682.667v128c0 25.6 17.067 42.667 42.667 42.667zM810.667 42.667h-597.333c-25.6 0-42.667 17.067-42.667 42.667v384h682.667v-384c0-25.6-17.067-42.667-42.667-42.667z" />
<glyph unicode="&#xe903;" glyph-name="camera" d="M896 725.334h-149.333l-72.533 110.933c-8.533 8.533-21.333 17.067-34.133 17.067h-256c-12.8 0-25.6-8.533-34.133-17.067l-72.533-110.933h-149.333c-72.533 0-128-55.467-128-128v-469.333c0-72.533 55.467-128 128-128h768c72.533 0 128 55.467 128 128v469.333c0 72.533-55.467 128-128 128zM938.667 128c0-25.6-17.067-42.667-42.667-42.667h-768c-25.6 0-42.667 17.067-42.667 42.667v469.333c0 25.6 17.067 42.667 42.667 42.667h170.667c12.8 0 25.6 8.533 34.133 17.067l72.533 110.933h209.067l72.533-110.933c12.8-8.533 25.6-17.067 38.4-17.067h170.667c25.6 0 42.667-17.067 42.667-42.667v-469.333zM512 597.334c-119.467 0-213.333-93.867-213.333-213.333s93.867-213.333 213.333-213.333 213.333 93.867 213.333 213.333-93.867 213.333-213.333 213.333zM512 256c-72.533 0-128 55.467-128 128s55.467 128 128 128 128-55.467 128-128-55.467-128-128-128z" />
<glyph unicode="&#xe904;" glyph-name="check" d="M883.2 712.534c-17.067 17.067-42.667 17.067-59.733 0l-439.467-439.467-183.467 183.467c-17.067 17.067-42.667 17.067-59.733 0s-17.067-42.667 0-59.733l213.333-213.333c8.533-8.533 17.067-12.8 29.867-12.8s21.333 4.267 29.867 12.8l469.333 469.333c17.067 17.067 17.067 42.667 0 59.733z" />
<glyph unicode="&#xe905;" glyph-name="arrow-left" d="M443.733 426.667l226.133 226.133c17.067 17.067 17.067 42.667 0 59.733s-42.667 17.067-59.733 0l-256-256c-17.067-17.067-17.067-42.667 0-59.733l256-256c8.533-8.533 21.333-12.8 29.867-12.8s21.333 4.267 29.867 12.8c17.067 17.067 17.067 42.667 0 59.733l-226.133 226.133z" />
<glyph unicode="&#xe906;" glyph-name="arrow-right" d="M669.867 456.534l-256 256c-17.067 17.067-42.667 17.067-59.733 0s-17.067-42.667 0-59.733l226.133-226.133-226.133-226.133c-17.067-17.067-17.067-42.667 0-59.733 8.533-8.533 17.067-12.8 29.867-12.8s21.333 4.267 29.867 12.8l256 256c17.067 17.067 17.067 42.667 0 59.733z" />
<glyph unicode="&#xe908;" glyph-name="crop" d="M981.333 213.334h-170.667v384c0 72.533-55.467 128-128 128l-379.733-4.267v174.933c0 25.6-17.067 42.667-42.667 42.667 0 0 0 0 0 0-21.333 0-42.667-17.067-42.667-42.667v-174.933h-174.933c-25.6 0-42.667-21.333-42.667-42.667s21.333-42.667 42.667-42.667c0 0 0 0 0 0h174.933l-4.267-379.733c0-72.533 55.467-128 128-128h384v-170.667c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v170.667h170.667c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667zM341.333 213.334c-25.6 0-42.667 17.067-42.667 42.667l4.267 379.733 379.733 4.267c25.6 0 42.667-17.067 42.667-42.667v-384h-384z" />
<glyph unicode="&#xe909;" glyph-name="download" d="M896 341.334c-25.6 0-42.667-17.067-42.667-42.667v-170.667c0-25.6-17.067-42.667-42.667-42.667h-597.333c-25.6 0-42.667 17.067-42.667 42.667v170.667c0 25.6-17.067 42.667-42.667 42.667s-42.667-17.067-42.667-42.667v-170.667c0-72.533 55.467-128 128-128h597.333c72.533 0 128 55.467 128 128v170.667c0 25.6-17.067 42.667-42.667 42.667zM482.133 268.8c4.267-4.267 8.533-8.533 12.8-8.533 4.267-4.267 12.8-4.267 17.067-4.267s12.8 0 17.067 4.267c4.267 4.267 8.533 4.267 12.8 8.533l213.333 213.333c17.067 17.067 17.067 42.667 0 59.733s-42.667 17.067-59.733 0l-140.8-140.8v409.6c0 25.6-17.067 42.667-42.667 42.667s-42.667-17.067-42.667-42.667v-409.6l-140.8 140.8c-17.067 17.067-42.667 17.067-59.733 0s-17.067-42.667 0-59.733l213.333-213.333z" />
<glyph unicode="&#xe90a;" glyph-name="edit" d="M853.333 354.134c-25.6 0-42.667-17.067-42.667-42.667v-226.133c0-25.6-17.067-42.667-42.667-42.667h-597.333c-25.6 0-42.667 17.067-42.667 42.667v597.333c0 25.6 17.067 42.667 42.667 42.667h226.133c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667h-226.133c-72.533 0-128-55.467-128-128v-597.333c0-72.533 55.467-128 128-128h597.333c72.533 0 128 55.467 128 128v226.133c0 25.6-17.067 42.667-42.667 42.667zM968.533 712.534l-170.667 170.667c-17.067 17.067-42.667 17.067-59.733 0l-426.667-426.667c-8.533-8.533-12.8-17.067-12.8-29.867v-170.667c0-25.6 17.067-42.667 42.667-42.667h170.667c12.8 0 21.333 4.267 29.867 12.8l426.667 426.667c17.067 17.067 17.067 42.667 0 59.733zM494.933 298.667h-110.933v110.933l384 384 110.933-110.933-384-384z" />
<glyph unicode="&#xe90b;" glyph-name="external" d="M768 426.667c-25.6 0-42.667-17.067-42.667-42.667v-256c0-25.6-17.067-42.667-42.667-42.667h-469.333c-25.6 0-42.667 17.067-42.667 42.667v469.333c0 25.6 17.067 42.667 42.667 42.667h256c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667h-256c-72.533 0-128-55.467-128-128v-469.333c0-72.533 55.467-128 128-128h469.333c72.533 0 128 55.467 128 128v256c0 25.6-17.067 42.667-42.667 42.667zM934.4 827.734c-4.267 8.533-12.8 17.067-21.333 21.333-4.267 4.267-12.8 4.267-17.067 4.267h-256c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h153.6l-396.8-396.8c-17.067-17.067-17.067-42.667 0-59.733 8.533-8.533 17.067-12.8 29.867-12.8s21.333 4.267 29.867 12.8l396.8 396.8v-153.6c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v256c0 4.267 0 12.8-4.267 17.067z" />
<glyph unicode="&#xe90c;" glyph-name="eye" d="M1019.733 443.734c-8.533 17.067-187.733 366.933-507.733 366.933s-499.2-349.867-507.733-366.933c-4.267-12.8-4.267-25.6 0-38.4 8.533-12.8 187.733-362.667 507.733-362.667s499.2 349.867 507.733 366.933c4.267 8.533 4.267 25.6 0 34.133zM512 128c-230.4 0-379.733 230.4-422.4 298.667 38.4 68.267 192 298.667 422.4 298.667s379.733-230.4 422.4-298.667c-42.667-68.267-192-298.667-422.4-298.667zM512 597.334c-93.867 0-170.667-76.8-170.667-170.667s76.8-170.667 170.667-170.667c93.867 0 170.667 76.8 170.667 170.667s-76.8 170.667-170.667 170.667zM512 341.334c-46.933 0-85.333 38.4-85.333 85.333s38.4 85.333 85.333 85.333c46.933 0 85.333-38.4 85.333-85.333s-38.4-85.333-85.333-85.333z" />
<glyph unicode="&#xe90d;" glyph-name="file" d="M891.733 571.734c-4.267 4.267-4.267 8.533-8.533 12.8l-298.667 298.667c-4.267 4.267-8.533 8.533-12.8 8.533-4.267 4.267-12.8 4.267-17.067 4.267h-298.667c-72.533 0-128-55.467-128-128v-682.667c0-72.533 55.467-128 128-128h512c72.533 0 128 55.467 128 128v469.333c0 4.267 0 12.8-4.267 17.067zM597.333 750.934l153.6-153.6h-153.6v153.6zM768 42.667h-512c-25.6 0-42.667 17.067-42.667 42.667v682.667c0 25.6 17.067 42.667 42.667 42.667h256v-256c0-25.6 17.067-42.667 42.667-42.667h256v-426.667c0-25.6-17.067-42.667-42.667-42.667z" />
<glyph unicode="&#xe90f;" glyph-name="video" d="M844.8 896h-665.6c-76.8 0-136.533-59.733-136.533-136.533v-665.6c0-76.8 59.733-136.533 136.533-136.533h665.6c76.8 0 136.533 59.733 136.533 136.533v665.6c0 76.8-59.733 136.533-136.533 136.533zM768 597.334h128v-128h-128v128zM682.667 469.334h-341.333v341.333h341.333v-341.333zM256 469.334h-128v128h128v-128zM128 384h128v-128h-128v128zM341.333 384h341.333v-341.333h-341.333v341.333zM768 384h128v-128h-128v128zM896 759.467v-76.8h-128v128h76.8c29.867 0 51.2-21.333 51.2-51.2zM179.2 810.667h76.8v-128h-128v76.8c0 29.867 21.333 51.2 51.2 51.2zM128 93.867v76.8h128v-128h-76.8c-29.867 0-51.2 21.333-51.2 51.2zM844.8 42.667h-76.8v128h128v-76.8c0-29.867-21.333-51.2-51.2-51.2z" />
<glyph unicode="&#xe910;" glyph-name="folder" d="M853.333 725.334h-362.667l-72.533 110.933c-8.533 8.533-21.333 17.067-34.133 17.067h-213.333c-72.533 0-128-55.467-128-128v-597.333c0-72.533 55.467-128 128-128h682.667c72.533 0 128 55.467 128 128v469.333c0 72.533-55.467 128-128 128zM896 128c0-25.6-17.067-42.667-42.667-42.667h-682.667c-25.6 0-42.667 17.067-42.667 42.667v597.333c0 25.6 17.067 42.667 42.667 42.667h192l72.533-110.933c8.533-8.533 21.333-17.067 34.133-17.067h384c25.6 0 42.667-17.067 42.667-42.667v-469.333z" />
<glyph unicode="&#xe911;" glyph-name="help" d="M512 896c-260.267 0-469.333-209.067-469.333-469.333s209.067-469.333 469.333-469.333 469.333 209.067 469.333 469.333-209.067 469.333-469.333 469.333zM512 42.667c-213.333 0-384 170.667-384 384s170.667 384 384 384c213.333 0 384-170.667 384-384s-170.667-384-384-384zM563.2 674.134c-89.6 29.867-187.733-17.067-217.6-102.4-4.267-25.6 4.267-51.2 29.867-55.467 21.333-8.533 46.933 4.267 55.467 25.6 17.067 42.667 64 68.267 110.933 51.2 34.133-12.8 55.467-42.667 55.467-81.067 0-42.667-72.533-76.8-98.133-89.6-21.333-8.533-34.133-29.867-25.6-55.467 4.267-17.067 21.333-29.867 38.4-29.867 4.267 0 8.533 0 12.8 4.267 17.067 4.267 157.867 55.467 157.867 166.4-4.267 76.8-51.2 140.8-119.467 166.4zM482.133 243.2c-8.533-8.533-12.8-17.067-12.8-29.867s4.267-21.333 12.8-29.867c8.533-8.533 17.067-12.8 29.867-12.8s21.333 4.267 29.867 12.8c8.533 8.533 12.8 21.333 12.8 29.867s-4.267 21.333-12.8 29.867c-17.067 17.067-42.667 17.067-59.733 0z" />
<glyph unicode="&#xe912;" glyph-name="image" d="M810.667 853.334h-597.333c-72.533 0-128-55.467-128-128v-597.333c0-72.533 55.467-128 128-128h597.333c72.533 0 128 55.467 128 128v597.333c0 72.533-55.467 128-128 128zM170.667 725.334c0 25.6 17.067 42.667 42.667 42.667h597.333c25.6 0 42.667-17.067 42.667-42.667v-324.267l-140.8 140.8c-17.067 17.067-42.667 17.067-59.733 0l-452.267-452.267c-17.067 4.267-29.867 21.333-29.867 38.4v597.333zM810.667 85.334h-494.933l366.933 366.933 170.667-170.667v-153.6c0-25.6-17.067-42.667-42.667-42.667zM362.667 469.334c59.733 0 106.667 46.933 106.667 106.667s-46.933 106.667-106.667 106.667-106.667-46.933-106.667-106.667 46.933-106.667 106.667-106.667zM362.667 597.334c12.8 0 21.333-8.533 21.333-21.333s-8.533-21.333-21.333-21.333-21.333 8.533-21.333 21.333 8.533 21.333 21.333 21.333z" />
<glyph unicode="&#xe913;" glyph-name="link" d="M384 256h-128c-93.867 0-170.667 76.8-170.667 170.667s76.8 170.667 170.667 170.667h128c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667h-128c-140.8 0-256-115.2-256-256s115.2-256 256-256h128c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667zM768 682.667h-128c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h128c93.867 0 170.667-76.8 170.667-170.667s-76.8-170.667-170.667-170.667h-128c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h128c140.8 0 256 115.2 256 256s-115.2 256-256 256zM298.667 426.667c0-25.6 17.067-42.667 42.667-42.667h341.333c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667h-341.333c-25.6 0-42.667-17.067-42.667-42.667z" />
<glyph unicode="&#xe914;" glyph-name="message" d="M810.667 853.334h-597.333c-72.533 0-128-55.467-128-128v-682.667c0-17.067 8.533-34.133 25.6-38.4 4.267-4.267 12.8-4.267 17.067-4.267 12.8 0 21.333 4.267 29.867 12.8l157.867 157.867h494.933c72.533 0 128 55.467 128 128v426.667c0 72.533-55.467 128-128 128zM853.333 298.667c0-25.6-17.067-42.667-42.667-42.667h-512c-12.8 0-21.333-4.267-29.867-12.8l-98.133-98.133v580.267c0 25.6 17.067 42.667 42.667 42.667h597.333c25.6 0 42.667-17.067 42.667-42.667v-426.667z" />
<glyph unicode="&#xe915;" glyph-name="menu" d="M597.333 426.667c0-47.128-38.205-85.333-85.333-85.333s-85.333 38.205-85.333 85.333c0 47.128 38.205 85.333 85.333 85.333s85.333-38.205 85.333-85.333zM896 426.667c0-47.128-38.205-85.333-85.333-85.333s-85.333 38.205-85.333 85.333c0 47.128 38.205 85.333 85.333 85.333s85.333-38.205 85.333-85.333zM298.667 426.667c0-47.128-38.205-85.333-85.333-85.333s-85.333 38.205-85.333 85.333c0 47.128 38.205 85.333 85.333 85.333s85.333-38.205 85.333-85.333z" />
<glyph unicode="&#xe916;" glyph-name="move" d="M977.067 409.6c4.267 8.533 4.267 21.333 0 34.133-4.267 4.267-4.267 8.533-8.533 12.8l-128 128c-17.067 17.067-42.667 17.067-59.733 0s-17.067-42.667 0-59.733l55.467-55.467h-281.6v281.6l55.467-55.467c8.533-8.533 17.067-12.8 29.867-12.8s21.333 4.267 29.867 12.8c17.067 17.067 17.067 42.667 0 59.733l-128 128c-4.267 4.267-8.533 8.533-12.8 8.533-8.533 4.267-21.333 4.267-34.133 0-4.267-4.267-8.533-4.267-12.8-8.533l-128-128c-17.067-17.067-17.067-42.667 0-59.733s42.667-17.067 59.733 0l55.467 55.467v-281.6h-281.6l55.467 55.467c17.067 17.067 17.067 42.667 0 59.733s-42.667 17.067-59.733 0l-128-128c-4.267-4.267-8.533-8.533-8.533-12.8-4.267-8.533-4.267-21.333 0-34.133 4.267-4.267 4.267-8.533 8.533-12.8l128-128c8.533-8.533 17.067-12.8 29.867-12.8s21.333 4.267 29.867 12.8c17.067 17.067 17.067 42.667 0 59.733l-55.467 55.467h281.6v-281.6l-55.467 55.467c-17.067 17.067-42.667 17.067-59.733 0s-17.067-42.667 0-59.733l128-128c4.267-4.267 8.533-8.533 12.8-8.533 4.267-4.267 12.8-4.267 17.067-4.267s12.8 0 17.067 4.267c4.267 4.267 8.533 4.267 12.8 8.533l128 128c17.067 17.067 17.067 42.667 0 59.733s-42.667 17.067-59.733 0l-55.467-55.467v281.6h281.6l-55.467-55.467c-17.067-17.067-17.067-42.667 0-59.733 8.533-8.533 21.333-12.8 29.867-12.8s21.333 4.267 29.867 12.8l128 128c4.267 4.267 8.533 8.533 8.533 12.8z" />
<glyph unicode="&#xe917;" glyph-name="audio" d="M921.6 844.8c-8.533 8.533-21.333 8.533-34.133 8.533l-512-85.333c-17.067-4.267-34.133-21.333-34.133-42.667v-469.333h-128c-72.533 0-128-55.467-128-128s55.467-128 128-128h85.333c72.533 0 128 55.467 128 128v563.2l426.667 72.533v-422.4h-128c-72.533 0-128-55.467-128-128s55.467-128 128-128h85.333c72.533 0 128 55.467 128 128v597.333c0 12.8-4.267 25.6-17.067 34.133zM341.333 128c0-25.6-17.067-42.667-42.667-42.667h-85.333c-25.6 0-42.667 17.067-42.667 42.667s17.067 42.667 42.667 42.667h128v-42.667zM853.333 213.334c0-25.6-17.067-42.667-42.667-42.667h-85.333c-25.6 0-42.667 17.067-42.667 42.667s17.067 42.667 42.667 42.667h128v-42.667z" />
<glyph unicode="&#xe918;" glyph-name="plus" d="M810.667 469.334h-256v256c0 25.6-17.067 42.667-42.667 42.667s-42.667-17.067-42.667-42.667v-256h-256c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h256v-256c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v256h256c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667z" />
<glyph unicode="&#xe919;" glyph-name="refresh" d="M887.467 337.067c-21.333 8.533-46.933-4.267-55.467-25.6-17.067-46.933-42.667-93.867-81.067-128-59.733-64-149.333-98.133-238.933-98.133 0 0 0 0 0 0-89.6 0-174.933 34.133-243.2 102.4l-119.467 110.933h149.333c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667h-256c0 0 0 0 0 0-4.267 0-8.533 0-8.533-4.267 0 0-4.267 0-4.267 0s-4.267 0-4.267-4.267c-4.267 0-8.533-4.267-8.533-8.533 0 0 0 0 0 0s0-4.267-4.267-4.267c0-4.267-4.267-4.267-4.267-8.533s0-4.267 0-8.533c0 0 0-4.267 0-4.267v-256c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v157.867l123.733-119.467c72.533-81.067 179.2-123.733 294.4-123.733 0 0 0 0 0 0 115.2 0 221.867 42.667 302.933 123.733 42.667 42.667 81.067 98.133 102.4 157.867 4.267 25.6-8.533 51.2-29.867 55.467zM1024 507.734c0 0 0 4.267 0 4.267v256c0 25.6-17.067 42.667-42.667 42.667s-42.667-17.067-42.667-42.667v-157.867l-123.733 119.467c-42.667 42.667-98.133 81.067-157.867 102.4-110.933 34.133-226.133 29.867-328.533-21.333-102.4-46.933-179.2-132.267-217.6-243.2-8.533-21.333 4.267-46.933 25.6-51.2 21.333-8.533 46.933 4.267 55.467 25.6 29.867 85.333 93.867 153.6 174.933 196.267 81.067 38.4 174.933 42.667 260.267 12.8 46.933-17.067 93.867-42.667 128-81.067l119.467-115.2h-149.333c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h256c4.267 0 12.8 0 17.067 4.267 0 0 0 0 0 0 4.267 4.267 8.533 4.267 12.8 8.533 0 0 0 0 0 0s0 4.267 4.267 4.267c0 4.267 4.267 4.267 4.267 8.533 4.267 4.267 4.267 8.533 4.267 12.8z" />
<glyph unicode="&#xe91a;" glyph-name="rotate" d="M1024 507.734c0 0 0 4.267 0 4.267v256c0 25.6-17.067 42.667-42.667 42.667s-42.667-17.067-42.667-42.667v-157.867l-123.733 119.467c-42.667 42.667-98.133 81.067-157.867 102.4-226.133 76.8-469.333-42.667-546.133-264.533s38.4-465.067 260.267-546.133c46.933-12.8 93.867-21.333 140.8-21.333 174.933 0 341.333 110.933 401.067 285.867 8.533 21.333-4.267 46.933-25.6 55.467s-46.933-4.267-55.467-25.6c-64-179.2-256-268.8-435.2-209.067-179.2 64-268.8 256-209.067 435.2 64 174.933 260.267 268.8 439.467 204.8 46.933-17.067 93.867-42.667 128-81.067l119.467-110.933h-149.333c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h256c0 0 0 0 0 0 4.267 0 8.533 0 8.533 4.267 0 0 4.267 0 4.267 0s4.267 4.267 4.267 4.267c4.267 0 8.533 4.267 8.533 8.533 0 0 0 0 0 0s0 4.267 4.267 4.267c0 4.267 4.267 4.267 4.267 8.533 8.533 0 8.533 4.267 8.533 8.533z" />
<glyph unicode="&#xe91b;" glyph-name="save" d="M925.867 627.2l-213.333 213.333c-8.533 8.533-17.067 12.8-29.867 12.8h-469.333c-72.533 0-128-55.467-128-128v-597.333c0-72.533 55.467-128 128-128h597.333c72.533 0 128 55.467 128 128v469.333c0 12.8-4.267 21.333-12.8 29.867zM682.667 85.334h-341.333v256h341.333v-256zM853.333 128c0-25.6-17.067-42.667-42.667-42.667h-42.667v298.667c0 25.6-17.067 42.667-42.667 42.667h-426.667c-25.6 0-42.667-17.067-42.667-42.667v-298.667h-42.667c-25.6 0-42.667 17.067-42.667 42.667v597.333c0 25.6 17.067 42.667 42.667 42.667h42.667v-170.667c0-25.6 17.067-42.667 42.667-42.667h341.333c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667h-298.667v128h324.267l187.733-187.733v-452.267z" />
<glyph unicode="&#xe91c;" glyph-name="search" d="M925.867 72.534l-157.867 157.867c51.2 64 85.333 149.333 85.333 238.933 0 213.333-170.667 384-384 384s-384-170.667-384-384c0-213.333 170.667-384 384-384 89.6 0 174.933 29.867 238.933 85.333l157.867-157.867c8.533-8.533 21.333-12.8 29.867-12.8s21.333 4.267 29.867 12.8c17.067 17.067 17.067 42.667 0 59.733zM170.667 469.334c0 166.4 132.267 298.667 298.667 298.667s298.667-132.267 298.667-298.667c0-81.067-34.133-157.867-85.333-209.067 0 0 0 0 0 0s0 0 0 0c-55.467-55.467-128-85.333-209.067-85.333-170.667-4.267-302.933 128-302.933 294.4z" />
<glyph unicode="&#xe91d;" glyph-name="settings" d="M512 597.334c-93.867 0-170.667-76.8-170.667-170.667s76.8-170.667 170.667-170.667c93.867 0 170.667 76.8 170.667 170.667s-76.8 170.667-170.667 170.667zM512 341.334c-46.933 0-85.333 38.4-85.333 85.333s38.4 85.333 85.333 85.333c46.933 0 85.333-38.4 85.333-85.333s-38.4-85.333-85.333-85.333zM866.133 281.6c4.267 8.533 12.8 17.067 29.867 17.067 72.533 0 128 55.467 128 128s-55.467 128-128 128h-8.533c-8.533 0-17.067 4.267-21.333 12.8 0 4.267 0 4.267-4.267 8.533-4.267 8.533-4.267 21.333 8.533 34.133 51.2 51.2 51.2 132.267 0 179.2v0c0 0 0 0 0 0-25.6 25.6-55.467 38.4-89.6 38.4 0 0 0 0 0 0-34.133 0-68.267-12.8-93.867-38.4-8.533-8.533-21.333-8.533-29.867-4.267-8.533 0-17.067 12.8-17.067 25.6 0 72.533-55.467 128-128 128s-128-55.467-128-128v-8.533c0-8.533-4.267-17.067-12.8-21.333-4.267 0-4.267 0-8.533-4.267-8.533-4.267-21.333 0-34.133 8.533-51.2 51.2-132.267 51.2-179.2 0-51.2-51.2-51.2-132.267 4.267-183.467 8.533-8.533 8.533-21.333 4.267-34.133-4.267-8.533-17.067-17.067-29.867-17.067-72.533 0-128-55.467-128-128s55.467-128 128-128h8.533c12.8 0 21.333-8.533 25.6-17.067s4.267-21.333-8.533-34.133c-25.6-25.6-38.4-55.467-38.4-89.6s12.8-64 38.4-89.6c0 0 0 0 0 0 51.2-51.2 132.267-51.2 183.467 4.267 8.533 8.533 21.333 8.533 34.133 4.267s17.067-12.8 17.067-29.867c0-72.533 55.467-128 128-128s128 55.467 128 128v8.533c0 12.8 8.533 21.333 17.067 25.6s21.333 4.267 34.133-8.533c51.2-51.2 132.267-51.2 179.2 0 51.2 51.2 51.2 132.267-4.267 183.467-4.267 8.533-8.533 21.333-4.267 29.867 0 0 0 0 0 0zM789.333 315.734c-17.067-42.667-8.533-89.6 25.6-128 8.533-8.533 12.8-17.067 12.8-29.867s-4.267-21.333-12.8-29.867c-8.533-8.533-17.067-12.8-29.867-12.8 0 0 0 0 0 0-12.8 0-21.333 4.267-34.133 17.067-34.133 34.133-81.067 42.667-123.733 21.333-42.667-17.067-68.267-59.733-68.267-102.4v-8.533c0-25.6-17.067-42.667-42.667-42.667s-42.667 17.067-42.667 42.667c0 0 0 4.267 0 4.267 0 46.933-29.867 85.333-72.533 102.4-12.8 8.533-29.867 8.533-46.933 8.533-29.867 0-59.733-12.8-81.067-34.133-17.067-17.067-42.667-17.067-59.733 0 0 0 0 0 0 0v0c-8.533 8.533-12.8 17.067-12.8 29.867s4.267 21.333 17.067 34.133c34.133 34.133 42.667 81.067 21.333 123.733-17.067 42.667-59.733 68.267-102.4 68.267h-8.533c-25.6 0-42.667 17.067-42.667 42.667s17.067 42.667 42.667 42.667c0 0 4.267 0 4.267 0 46.933 0 85.333 29.867 102.4 72.533s8.533 89.6-25.6 128c-17.067 17.067-17.067 42.667 0 59.733s42.667 17.067 64-4.267c29.867-29.867 76.8-38.4 115.2-25.6 4.267 0 8.533 0 12.8 4.267 42.667 17.067 68.267 59.733 68.267 102.4v8.533c0 25.6 17.067 42.667 42.667 42.667s42.667-17.067 42.667-46.933c0-46.933 25.6-85.333 68.267-102.4s89.6-8.533 128 25.6c8.533 8.533 17.067 12.8 29.867 12.8v0c12.8 0 21.333-4.267 29.867-12.8 0 0 0 0 0 0 17.067-17.067 17.067-42.667-4.267-64-29.867-29.867-38.4-76.8-25.6-115.2 0-4.267 0-8.533 4.267-12.8 17.067-42.667 59.733-68.267 102.4-68.267h8.533c25.6 0 42.667-17.067 42.667-42.667s-17.067-42.667-46.933-42.667c-42.667 0-85.333-25.6-102.4-68.267z" />
<glyph unicode="&#xe91e;" glyph-name="share" d="M768 298.667c-46.933 0-89.6-21.333-119.467-51.2l-226.133 132.267c0 17.067 4.267 29.867 4.267 46.933s-4.267 29.867-8.533 46.933l226.133 132.267c34.133-29.867 76.8-51.2 123.733-51.2 93.867 0 170.667 76.8 170.667 170.667s-76.8 170.667-170.667 170.667-170.667-76.8-170.667-170.667c0-17.067 4.267-29.867 8.533-46.933l-230.4-132.267c-29.867 29.867-72.533 51.2-119.467 51.2-93.867 0-170.667-76.8-170.667-170.667s76.8-170.667 170.667-170.667c46.933 0 89.6 21.333 119.467 51.2l226.133-132.267c0-17.067-4.267-29.867-4.267-46.933 0-93.867 76.8-170.667 170.667-170.667s170.667 76.8 170.667 170.667-76.8 170.667-170.667 170.667zM768 810.667c46.933 0 85.333-38.4 85.333-85.333s-38.4-85.333-85.333-85.333-85.333 38.4-85.333 85.333 38.4 85.333 85.333 85.333zM256 341.334c-46.933 0-85.333 38.4-85.333 85.333s38.4 85.333 85.333 85.333 85.333-38.4 85.333-85.333c0-46.933-38.4-85.333-85.333-85.333zM768 42.667c-46.933 0-85.333 38.4-85.333 85.333 0 17.067 4.267 29.867 12.8 42.667 0 0 0 0 0 0s0 0 0 0c12.8 25.6 42.667 42.667 72.533 42.667 46.933 0 85.333-38.4 85.333-85.333s-38.4-85.333-85.333-85.333z" />
<glyph unicode="&#xe91f;" glyph-name="deny" d="M844.8 93.867c85.333 85.333 136.533 200.533 136.533 332.8 0 260.267-209.067 469.333-469.333 469.333-128 0-247.467-51.2-332.8-136.533 0 0 0 0 0 0s0 0 0 0c-85.333-85.333-136.533-204.8-136.533-332.8 0-260.267 209.067-469.333 469.333-469.333 128 0 247.467 51.2 332.8 136.533 0 0 0 0 0 0s0 0 0 0zM896 426.667c0-89.6-29.867-174.933-85.333-238.933l-537.6 537.6c64 55.467 149.333 85.333 238.933 85.333 213.333 0 384-170.667 384-384zM128 426.667c0 89.6 29.867 174.933 85.333 238.933l537.6-537.6c-64-51.2-149.333-85.333-238.933-85.333-213.333 0-384 170.667-384 384z" />
<glyph unicode="&#xe920;" glyph-name="trash" d="M896 725.334h-170.667v42.667c0 72.533-55.467 128-128 128h-170.667c-72.533 0-128-55.467-128-128v-42.667h-170.667c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h42.667v-554.667c0-72.533 55.467-128 128-128h426.667c72.533 0 128 55.467 128 128v554.667h42.667c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667zM384 768c0 25.6 17.067 42.667 42.667 42.667h170.667c25.6 0 42.667-17.067 42.667-42.667v-42.667h-256v42.667zM768 85.334c0-25.6-17.067-42.667-42.667-42.667h-426.667c-25.6 0-42.667 17.067-42.667 42.667v554.667h512v-554.667zM426.667 512c-25.6 0-42.667-17.067-42.667-42.667v-256c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v256c0 25.6-17.067 42.667-42.667 42.667zM597.333 512c-25.6 0-42.667-17.067-42.667-42.667v-256c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v256c0 25.6-17.067 42.667-42.667 42.667z" />
<glyph unicode="&#xe921;" glyph-name="upload" d="M896 341.334c-25.6 0-42.667-17.067-42.667-42.667v-170.667c0-25.6-17.067-42.667-42.667-42.667h-597.333c-25.6 0-42.667 17.067-42.667 42.667v170.667c0 25.6-17.067 42.667-42.667 42.667s-42.667-17.067-42.667-42.667v-170.667c0-72.533 55.467-128 128-128h597.333c72.533 0 128 55.467 128 128v170.667c0 25.6-17.067 42.667-42.667 42.667zM328.533 567.467l140.8 140.8v-409.6c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v409.6l140.8-140.8c8.533-8.533 17.067-12.8 29.867-12.8s21.333 4.267 29.867 12.8c17.067 17.067 17.067 42.667 0 59.733l-213.333 213.333c-4.267 4.267-8.533 8.533-12.8 8.533-8.533 4.267-21.333 4.267-34.133 0-4.267-4.267-8.533-4.267-12.8-8.533l-213.333-213.333c-17.067-17.067-17.067-42.667 0-59.733s42.667-17.067 59.733 0z" />
<glyph unicode="&#xe922;" glyph-name="user" d="M682.667 341.334h-341.333c-119.467 0-213.333-93.867-213.333-213.333v-85.333c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v85.333c0 72.533 55.467 128 128 128h341.333c72.533 0 128-55.467 128-128v-85.333c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v85.333c0 119.467-93.867 213.333-213.333 213.333zM512 426.667c119.467 0 213.333 93.867 213.333 213.333s-93.867 213.333-213.333 213.333-213.333-93.867-213.333-213.333 93.867-213.333 213.333-213.333zM512 768c72.533 0 128-55.467 128-128s-55.467-128-128-128-128 55.467-128 128 55.467 128 128 128z" />
<glyph unicode="&#xe923;" glyph-name="remove" d="M571.733 426.667l226.133 226.133c17.067 17.067 17.067 42.667 0 59.733s-42.667 17.067-59.733 0l-226.133-226.133-226.133 226.133c-17.067 17.067-42.667 17.067-59.733 0s-17.067-42.667 0-59.733l226.133-226.133-226.133-226.133c-17.067-17.067-17.067-42.667 0-59.733 8.533-8.533 17.067-12.8 29.867-12.8s21.333 4.267 29.867 12.8l226.133 226.133 226.133-226.133c8.533-8.533 21.333-12.8 29.867-12.8s21.333 4.267 29.867 12.8c17.067 17.067 17.067 42.667 0 59.733l-226.133 226.133z" />
<glyph unicode="&#xe924;" glyph-name="zoom-in" d="M925.867 72.534l-157.867 157.867c51.2 64 85.333 149.333 85.333 238.933 0 213.333-170.667 384-384 384s-384-170.667-384-384c0-213.333 170.667-384 384-384 89.6 0 174.933 29.867 238.933 85.333l157.867-157.867c8.533-8.533 21.333-12.8 29.867-12.8s21.333 4.267 29.867 12.8c17.067 17.067 17.067 42.667 0 59.733zM170.667 469.334c0 166.4 132.267 298.667 298.667 298.667s298.667-132.267 298.667-298.667c0-81.067-34.133-157.867-85.333-209.067 0 0 0 0 0 0s0 0 0 0c-55.467-55.467-128-85.333-209.067-85.333-170.667-4.267-302.933 128-302.933 294.4zM597.333 512h-85.333v85.333c0 25.6-17.067 42.667-42.667 42.667s-42.667-17.067-42.667-42.667v-85.333h-85.333c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h85.333v-85.333c0-25.6 17.067-42.667 42.667-42.667s42.667 17.067 42.667 42.667v85.333h85.333c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667z" />
<glyph unicode="&#xe925;" glyph-name="zoom-out" d="M925.867 72.534l-157.867 157.867c51.2 64 85.333 149.333 85.333 238.933 0 213.333-170.667 384-384 384s-384-170.667-384-384c0-213.333 170.667-384 384-384 89.6 0 174.933 29.867 238.933 85.333l157.867-157.867c8.533-8.533 21.333-12.8 29.867-12.8s21.333 4.267 29.867 12.8c17.067 17.067 17.067 42.667 0 59.733zM170.667 469.334c0 166.4 132.267 298.667 298.667 298.667s298.667-132.267 298.667-298.667c0-81.067-34.133-157.867-85.333-209.067 0 0 0 0 0 0s0 0 0 0c-55.467-55.467-128-85.333-209.067-85.333-170.667-4.267-302.933 128-302.933 294.4zM597.333 512h-256c-25.6 0-42.667-17.067-42.667-42.667s17.067-42.667 42.667-42.667h256c25.6 0 42.667 17.067 42.667 42.667s-17.067 42.667-42.667 42.667z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -0,0 +1,198 @@
.fileuploader-theme-avatar {
position: relative;
width: 120px;
height: 120px;
padding: 0;
margin: 0;
background: none;
}
.fileuploader-theme-avatar .fileuploader-wrapper {
position: relative;
width: 100%;
height: 100%;
border-radius: 50%;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
overflow: hidden;
}
.fileuploader-theme-avatar .fileuploader-wrapper,
.fileuploader-theme-avatar .fileuploader-items .fileuploader-item .fileuploader-item-image {
background: #f9f9fc;
}
.fileuploader-theme-avatar .fileuploader-items {
height: 100%;
}
.fileuploader-theme-avatar .fileuploader-items .fileuploader-item {
height: 100%;
padding: 0;
margin: 0;
}
.fileuploader-theme-avatar .fileuploader-items .fileuploader-item.is-image-waiting .fileuploader-item-image img {
display: none;
}
.fileuploader-theme-avatar .fileuploader-droparea {
position: absolute;
display: flex;
top: 0;
left: 0;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
background: rgba(43, 56, 71, 0.6);
border-radius: 50%;
cursor: pointer;
transition: all 0.3s ease;
z-index: -1;
opacity: 0;
transform: scale(1.3);
}
.fileuploader-theme-avatar .fileuploader-droparea .fileuploader-icon-main {
font-size: 32px;
color: #fff;
}
.fileuploader-theme-avatar .fileuploader-dragging .fileuploader-droparea {
opacity: 1;
transform: scale(1);
z-index: 1;
}
.fileuploader-theme-avatar .progressbar3 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.fileuploader-theme-avatar .progressbar3 span {
position: relative;
display: inline-block;
font-size: 16px;
font-weight: 700;
color: #1f344a;
z-index: 1;
}
.fileuploader-theme-avatar .progressbar3 [data-action] {
cursor: pointer;
}
.fileuploader-theme-avatar .progressbar3 svg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.fileuploader-theme-avatar .progressbar3 svg circle {
stroke: #5b7bfe;
stroke-width: 4px;
fill: transparent;
transition: 0.3s stroke-dashoffset, 0.3s transform;
transform: rotate(-90deg);
transform-origin: 50% 50%;
}
.fileuploader-theme-avatar .progressbar3.is-reset svg circle {
transition: none;
}
.fileuploader-theme-avatar .progressbar3 svg .progress-dash {
stroke: #dae2fd;
}
.fileuploader-theme-avatar .fileuploader-item.upload-complete .progressbar3 svg {
transform: scale(0.5);
}
.fileuploader-theme-avatar .fileuploader-item.upload-complete .progressbar3 span {
font-size: 16px;
color: #fff;
}
.fileuploader-theme-avatar .fileuploader-item.upload-complete .progressbar3 svg .progress-dash {
stroke-width: 0;
transform: scale(1.3);
}
.fileuploader-theme-avatar .fileuploader-item.upload-successful .progressbar3 svg circle {
stroke: #43D084;
fill: #43D084;
}
.fileuploader-theme-avatar .fileuploader-item.upload-successful .progressbar3 svg .progress-dash {
fill: rgba(67, 208, 132, 0.6);
}
.fileuploader-theme-avatar .fileuploader-item.upload-failed .progressbar3 svg circle {
stroke: #FE7676;
fill: #FE7676;
}
.fileuploader-theme-avatar .fileuploader-item.upload-failed .progressbar3 svg .progress-dash {
fill: rgba(254, 118, 118, 0.6);
}
.fileuploader-theme-avatar .fileuploader-menu {
position: absolute;
bottom: 6%;
right: 8%;
z-index: 1;
}
.fileuploader-theme-avatar .fileuploader-menu-open {
padding: 2px 4px;
border-radius: 4px;
background: #fff;
color: #5b7bfe;
font-size: 18px;
line-height: 0;
box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.2);
cursor: pointer;
}
.fileuploader-theme-avatar .fileuploader-menu ul {
display: none;
position: absolute;
top: 100%;
left: 0;
background: #fff;
list-style: none;
margin: 0;
padding: 0;
margin-top: -1px;
box-shadow: 1px 6px 10px rgba(0, 0, 0, 0.1);
border-radius: 0 0 4px 4px;
}
.fileuploader-theme-avatar .fileuploader-menu.is-shown .fileuploader-menu-open {
transform: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.fileuploader-theme-avatar .fileuploader-menu.is-shown ul {
display: block;
}
.fileuploader-theme-avatar .fileuploader-menu ul li {
margin: 0;
padding: 0;
}
.fileuploader-theme-avatar .fileuploader-menu ul li a {
display: block;
padding: 10px 12px;
min-width: 120px;
color: #1f344a;
cursor: pointer;
text-decoration: none;
}
.fileuploader-theme-avatar .fileuploader-menu ul li a i {
margin-right: 6px;
}
.fileuploader-theme-avatar .fileuploader-menu ul li a:hover {
background: rgba(0, 0, 0, 0.03)
}
.fileuploader-theme-avatar .fileuploader-menu ul li a:active {
background: rgba(0, 0, 0, 0.05)
}
.fileuploader-theme-avatar:hover .fileuploader-menu {
transform: translateY(0);
opacity: 1;
}
.fileuploader-popup-preview.is-for-avatar .fileuploader-cropper .fileuploader-cropper-area .area-image,
.fileuploader-popup-preview.is-for-avatar .fileuploader-cropper .fileuploader-cropper-area .area-move:after {
border-radius: 50%;
}

View File

@@ -0,0 +1,52 @@
/* input */
.fileuploader-theme-dragdrop .fileuploader-input {
display: block;
padding: 60px 0;
background: #fff;
border: 2px dashed #c2cdda;
border-radius: 14px;
text-align: center;
}
.fileuploader-theme-dragdrop .fileuploader-input .fileuploader-icon-main {
display: block;
font-size: 56px;
margin: 0 auto;
margin-bottom: 26px;
}
.fileuploader-theme-dragdrop .fileuploader-input h3 {
margin: 0;
margin-bottom: 8px;
padding: 0;
background: none;
border: none;
font-size: 18px;
font-weight: bold;
color: #5B5B7B;
white-space: normal;
box-shadow: none;
}
.fileuploader-theme-dragdrop .fileuploader-input p {
margin: 0;
padding: 0;
color: #90a0bc;
margin-bottom: 12px;
}
/* dragging state */
.fileuploader-theme-dragdrop .fileuploader-input .fileuploader-input-inner > * {
-webkit-transition: 500ms cubic-bezier(0.17, 0.67, 0, 1.01);
transition: 500ms cubic-bezier(0.17, 0.67, 0, 1.01);
}
.fileuploader-theme-dragdrop .fileuploader-input.fileuploader-dragging .fileuploader-input-inner > * {
transform: translateY(18px);
opacity: 0;
}
.fileuploader-theme-dragdrop .fileuploader-input.fileuploader-dragging .fileuploader-icon-main {
transform: translateY(30px) scale(1.2);
opacity: 0.6;
}
.fileuploader-theme-dragdrop .fileuploader-input.fileuploader-dragging .fileuploader-input-caption {
transform: translateY(30px);
opacity: 0.6;
}

View File

@@ -0,0 +1,278 @@
.fileuploader .is-hidden {
display:none !important;
}
/* input & items size */
.fileuploader-theme-gallery .fileuploader-input,
.fileuploader-theme-gallery .fileuploader-items-list .fileuploader-item {
position: relative;
display: inline-block;
margin: 16px 0 0 16px;
padding: 0;
vertical-align: top;
width: 16.66666667%;
width: calc(16.66666667% - 16px);
}
/* input */
.fileuploader-theme-gallery .fileuploader-input-inner {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
min-height: 210px;
border: 2px dashed #d5d9e0;
text-align: center;
color: #90a0b1;
font-weight: 700;
cursor: pointer;
border-radius: 6px;
user-select: none;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.fileuploader-theme-gallery .fileuploader-input-inner .fileuploader-icon-main {
font-size: 34px;
margin-bottom: 4px;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.fileuploader-theme-gallery .fileuploader-input-inner:hover {
border-color: #b8beca;
background: #fcfcfe;
box-shadow: 0 4px 24px -1px rgba(0,0,0,0.05);
}
.fileuploader-theme-gallery .fileuploader-input-inner:hover .fileuploader-icon-main {
margin-bottom: 12px;
}
.fileuploader-theme-gallery .fileuploader-input-inner:active,
.fileuploader-theme-gallery .fileuploader-dragging .fileuploader-input-inner {
background: #fffffe;
}
.fileuploader-theme-gallery .fileuploader-input-inner:active .fileuploader-icon-main,
.fileuploader-theme-gallery .fileuploader-dragging .fileuploader-input-inner .fileuploader-icon-main {
margin-bottom: 0;
}
/* items */
.fileuploader-theme-gallery .fileuploader-items .fileuploader-items-list {
display: flex;
flex-wrap: wrap;
margin: -16px 0 0 -16px;
}
.fileuploader-theme-gallery .fileuploader-items .fileuploader-item {
border-bottom: 0;
}
.fileuploader-theme-gallery .fileuploader-items .fileuploader-item:last-child {
margin-bottom: 0;
}
.fileuploader-theme-gallery .fileuploader-items .fileuploader-item-inner {
height: 100%;
background: #fff;
border-radius: 6px;
box-shadow: 0 4px 24px -1px rgba(0,0,0,0.05);
overflow: hidden;
z-index: 1;
}
.fileuploader-theme-gallery .fileuploader-item-inner .thumbnail-holder {
position: relative;
width: 100%;
padding-top: 75%;
border-radius: 6px 6px 0 0;
overflow: hidden;
}
.fileuploader-theme-gallery .fileuploader-items-list .fileuploader-item-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: center;
border-radius: 0;
overflow: hidden;
}
.fileuploader-theme-gallery .thumbnail-holder .fileuploader-item-icon {
border-radius: 0;
font-size: 34px;
}
.fileuploader-theme-gallery .fileuploader-items .fileuploader-item .fileuploader-action-popup {
border-radius: 0;
z-index: 1;
}
.fileuploader-theme-gallery .fileuploader-item .actions-holder {
position: absolute;
top: 6px;
right: 0;
width: 100%;
height: 20px;
padding: 0 6px;
z-index: 2;
text-align: right;
}
.fileuploader-theme-gallery .fileuploader-items .fileuploader-item .fileuploader-action {
color: #fff;
text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}
.fileuploader-theme-gallery .fileuploader-items .fileuploader-item .fileuploader-action + .fileuploader-action {
margin-left: 8px;
}
.fileuploader-theme-gallery .fileuploader-item-inner .content-holder {
padding: 12px 8px;
text-align: center;
}
.fileuploader-theme-gallery .fileuploader-item-inner .content-holder h5 {
width: 100%;
margin: 0;
color: #35354f;
font-size: 14px;
font-weight: 700;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.fileuploader-theme-gallery .fileuploader-item-inner .content-holder span {
font-size: 12px;
color: #999a9f;
}
.fileuploader-theme-gallery .fileuploader-item .type-holder {
position: absolute;
top: 100%;
right: -4px;
width: 32px;
height: 32px;
margin-top: -24px;
text-transform: uppercase;
z-index: 1;
}
.fileuploader-theme-gallery .fileuploader-item .gallery-item-dropdown {
display: none;
position: absolute;
top: 100%;
right: 34px;
margin: 8px 0 0;
padding: 0;
background: #fff;
box-shadow: 1px 4px 12px rgba(0, 0, 0, 0.2);
border-radius: 4px;
overflow: hidden;
z-index: 1;
}
.fileuploader-theme-gallery .fileuploader-item .gallery-item-dropdown a {
display: block;
padding: 10px 12px;
min-width: 120px;
color: #35354f;
cursor: pointer;
text-decoration: none;
}
.fileuploader-theme-gallery .fileuploader-item .gallery-item-dropdown a:hover {
background: rgba(0, 0, 0, 0.03)
}
.fileuploader-theme-gallery .fileuploader-item .gallery-item-dropdown a:active {
background: rgba(0, 0, 0, 0.05)
}
.fileuploader-theme-gallery .file-main-1 .fileuploader-item-inner {
background: #789bec;
}
.fileuploader-theme-gallery .file-main-1 .fileuploader-item-inner .content-holder h5 {
color: #fff;
}
.fileuploader-theme-gallery .file-main-1 .fileuploader-item-inner .content-holder span {
color: rgba(255, 255, 255, 0.8);
}
/* uploading */
.fileuploader-theme-gallery .fileuploader-items .fileuploader-item.upload-failed .thumbnail-holder {
background: #db6868;
}
.fileuploader-theme-gallery .fileuploader-items .fileuploader-item.upload-failed .thumbnail-holder:after {
content: 'Error!';
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
font-weight: 700;
color: #9e4c4c;
}
.fileuploader-theme-gallery .fileuploader-item .progress-holder {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #fff;
display: none;
z-index: 1;
}
.fileuploader-theme-gallery .fileuploader-item .progress-holder span {
position: absolute;
top: 50%;
left: 50%;
display: inline-block;
font-size: 16px;
font-weight: 700;
color: #fff;
transform: translateX(-50%) translateY(-50%);
z-index: 1;
}
.fileuploader-theme-gallery .fileuploader-item .progress-holder .fileuploader-progressbar {
height: 100%;
border-radius: 0;
}
.fileuploader-theme-gallery .fileuploader-item .progress-holder .fileuploader-progressbar .bar {
width: 100%;
height: 0;
top: auto;
bottom: 0;
border-radius: 0;
background: rgba(0,0,0,0.1);
}
/* sorter */
.fileuploader-theme-gallery .fileuploader-items .fileuploader-item.sorting {
padding-top: 0;
margin: 0;
}
.fileuploader-theme-gallery .fileuploader-sorter-placeholder {
background: #f0f3f9;
border-radius: 6px;
}
/* responsive */
@media all and (max-width: 1200px) {
.fileuploader-theme-gallery .fileuploader-input,
.fileuploader-theme-gallery .fileuploader-items-list .fileuploader-item {
width: 25%;
width: calc(25% - 16px);
}
.fileuploader-theme-gallery .fileuploader-input-inner {
min-height: 220px;
}
}
@media all and (max-width: 768px) {
.fileuploader-theme-gallery .fileuploader-input,
.fileuploader-theme-gallery .fileuploader-items-list .fileuploader-item {
width: 33.33333333%;
width: calc(33.33333333% - 16px);
}
.fileuploader-theme-gallery .fileuploader-input-inner {
min-height: 225px;
}
}
@media all and (max-width: 576px) {
.fileuploader-theme-gallery .fileuploader-input,
.fileuploader-theme-gallery .fileuploader-items-list .fileuploader-item {
width: 50%;
width: calc(50% - 16px);
}
.fileuploader-theme-gallery .fileuploader-input-inner {
min-height: 182px;
}
}

View File

@@ -0,0 +1,196 @@
/* input & items size */
.fileuploader-theme-thumbnails .fileuploader-thumbnails-input,
.fileuploader-theme-thumbnails .fileuploader-items-list .fileuploader-item {
position: relative;
display: inline-block;
margin: 16px 0 0 16px;
padding: 0;
vertical-align: top;
width: 25%;
width: calc(25% - 16px);
padding-top: 20%;
}
.fileuploader-theme-thumbnails .fileuploader-thumbnails-input-inner,
.fileuploader-theme-thumbnails .fileuploader-item-inner {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 6px;
}
/* input */
.fileuploader-theme-thumbnails .fileuploader-thumbnails-input-inner {
background: #e6ebf4;
border: 2px dashed #92a7bf;
text-align: center;
font-size: 30px;
color: #90a0bc;
cursor: pointer;
opacity: 0.5;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.fileuploader-theme-thumbnails .fileuploader-thumbnails-input-inner:hover {
opacity: 1;
}
.fileuploader-theme-thumbnails .fileuploader-thumbnails-input-inner:active,
.fileuploader-theme-thumbnails .fileuploader-dragging .fileuploader-thumbnails-input-inner {
background: #f6f6fb;
}
.fileuploader-theme-thumbnails .fileuploader-thumbnails-input-inner i {
position: absolute;
font-style: normal;
left: 0;
top: 0;
top: 50%;
left: 50%;
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}
/* items */
.fileuploader-theme-thumbnails .fileuploader-items .fileuploader-items-list {
margin: -16px 0 0 -16px;
}
.fileuploader-theme-thumbnails .fileuploader-items .fileuploader-item {
border-bottom: 0;
}
.fileuploader-theme-thumbnails .fileuploader-items .fileuploader-item:last-child {
margin-bottom: 0;
}
.fileuploader-theme-thumbnails .fileuploader-items .fileuploader-item-inner {
background: rgba(0, 0, 0, 0.02);
overflow: hidden;
z-index: 1;
}
.fileuploader-theme-thumbnails .fileuploader-item-inner .thumbnail-holder,
.fileuploader-theme-thumbnails .fileuploader-items-list .fileuploader-item-image {
width: 100%;
height: 100%;
}
.fileuploader-theme-thumbnails .fileuploader-items-list .fileuploader-item-image {
position: relative;
text-align: center;
overflow: hidden;
}
.fileuploader-theme-thumbnails .fileuploader-items .fileuploader-item .fileuploader-item-icon i {
display: none;
}
.fileuploader-theme-thumbnails .fileuploader-items .fileuploader-item .fileuploader-action-popup {
border-radius: 6px;
z-index: 1;
}
.fileuploader-theme-thumbnails .fileuploader-item .type-holder {
position: absolute;
top: 6px;
left: 6px;
padding: 4px 6px;
background: rgba(0, 0, 0, 0.4);
text-transform: uppercase;
color: #fff;
font-size: 12px;
border-radius: 4px;
z-index: 2;
}
.fileuploader-theme-thumbnails .fileuploader-item .actions-holder {
position: absolute;
top: 6px;
right: 6px;
z-index: 2;
height: 20px;
}
.fileuploader-theme-thumbnails .fileuploader-items .fileuploader-item .fileuploader-action {
color: #fff;
text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}
.fileuploader-theme-thumbnails .fileuploader-items .fileuploader-item .fileuploader-action + .fileuploader-action {
margin-left: 8px;
}
.fileuploader-theme-thumbnails .fileuploader-item .content-holder {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 6px;
text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%);
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%);
z-index: 2;
}
.fileuploader-theme-thumbnails .fileuploader-item .content-holder h5 {
display: block;
margin: 0;
padding: 0;
font-size: 14px;
font-weight: normal;
color: #fff;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.fileuploader-theme-thumbnails .fileuploader-item .content-holder span {
display: block;
font-size: 11px;
color: rgba(255, 255, 255, 0.8);
}
/* uploading */
.fileuploader-theme-thumbnails .fileuploader-items .fileuploader-item.upload-failed .fileuploader-item-inner {
background: #db6868;
}
.fileuploader-theme-thumbnails .fileuploader-item .progress-holder {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #fff;
display: none;
z-index: 1;
}
.fileuploader-theme-thumbnails .fileuploader-item .progress-holder .fileuploader-progressbar {
position: relative;
top: 50%;
width: 80%;
height: 6px;
margin: 0 auto;
margin-top: -6px;
background: #dde4f6;
}
/* sorter */
.fileuploader-theme-thumbnails .fileuploader-items .fileuploader-item.sorting {
padding-top: 0;
margin: 0;
}
.fileuploader-theme-thumbnails .fileuploader-sorter-placeholder {
background: #f0f3f9;
border-radius: 6px;
}
/* responsive */
@media all and (max-width: 768px) {
.fileuploader-theme-thumbnails .fileuploader-thumbnails-input,
.fileuploader-theme-thumbnails .fileuploader-items-list .fileuploader-item {
width: 33.33333333%;
width: calc(33.33333333% - 16px);
padding-top: 30%;
}
}
@media all and (max-width: 480px) {
.fileuploader-theme-thumbnails .fileuploader-thumbnails-input,
.fileuploader-theme-thumbnails .fileuploader-items-list .fileuploader-item {
width: 50%;
width: calc(50% - 16px);
padding-top: 40%;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,714 @@
/**
* Fileuploader
* Copyright (c) 2019 Innostudio.de
* Website: https://innostudio.de/fileuploader/
* Version: 2.2 (23-Nov-2019)
* Requires: multer, mime-types and gm
* License: https://innostudio.de/fileuploader/documentation/#license
*/
const multer = require('multer')
const mime = require('mime-types')
const fs = require('fs')
const gm = require('gm')
const emptyFn = function() {}
const error_messages = {
EMPTY_FIELD: 'No file was choosed. Please select one',
MAX_FILES_NUMBER: 'Maximum number of files is exceeded',
INVALID_TYPE: 'File type is not allowed for {file_name}',
MAX_SIZE: 'Files are too large',
MAX_FILE_SIZE: '{file_name} is too large'
}
var Fileuploader = function(fieldname, options, req, res) {
var defaults = {
limit: null,
maxSize: null,
fileMaxSize: null,
extensions: null,
disallowedExtensions: null,
required: false,
uploadDir: 'uploads/',
title: ['auto', 12],
replace: false,
editor: null,
listInput: true,
files: [],
move_uploaded_file: function(file) {
fs.renameSync(file.tmp, file.file);
return true;
},
validate_file: null
};
this.req = req;
this.res = res;
this.options = extendDefaults.call(this, options, defaults);
this.multer = multer({
dest: this.options.uploadDir,
fileFilter: fileFilter
});
this.field = {
name: fieldname,
input: [],
listInput: null
};
return this;
}
Fileuploader.prototype.getFileList = function(customKey) {
var result = [],
files = this.options.files;
if (isset(customKey)) {
files.forEach(function(item, index) {
var attr = getFileAttribute(item, customKey);
result.push(attr ? attr : item.file);
});
} else {
result = files;
}
return result;
}
Fileuploader.prototype.getUploadedFiles = function() {
return this.options.files.filter(item => isset(item.uploaded));
}
Fileuploader.prototype.getPreloadedFiles = function() {
return this.options.files.filter(item => !isset(item.uploaded));
}
Fileuploader.prototype.getRemovedFiles = function(customKey = 'file') {
var result = [],
files = this.options.files,
listInput = this.field.listInput;
if (listInput != null) {
files.forEach(function(item, index, object) {
if (listInput.list.indexOf(getFileAttribute(item, customKey)) == -1 && !isset(item.uploaded)) {
result.push(item);
object.splice(index, 1);
}
});
}
return result;
}
Fileuploader.prototype.getListInput = function() {
return this.field.listInput;
}
Fileuploader.prototype.generateInput = function() {
var attributes = [],
properties = Object.assign({}, this.options, {name: this.field.name});
for(var key in properties) {
var value = properties[key],
attribute = 'data-fileuploader-' + key;
if (value) {
switch (key) {
case 'limit':
case 'maxSize':
case 'fileMaxSize':
attributes.push({key: attribute, value: value});
break;
case 'listInput':
attributes.push({key: attribute, value: typeof value == 'boolean' ? JSON.stringify(value) : value});
break;
case 'extensions':
attributes.push({key: attribute, value: value.join(',')});
break;
case 'name':
attributes.push({key: key, value: value});
break;
case 'required':
attributes.push({key: key, value: ''});
break;
case 'files':
attributes.push({key: attribute, value: JSON.stringify(value)});
break;
}
}
}
return '<input type="file" ' + attributes.map(attr => attr.key + "='" + attr.value.replace(/\'/g, '"') + "'").join(' ') + '>';
}
Fileuploader.prototype.resize = function(filename, width = null, height = null, destination = null, crop = false, quality = 90, rotation = 0, callback = null) {
if (!fs.existsSync(filename) || /^image\//.test(this.mimeContentType(filename)) == false)
return false;
var source = gm(filename),
imageWidth = 0,
imageHeight = 0,
hasRotation = rotation,
hasCrop = crop instanceof Object || crop == true,
hasResizing = width || height,
destInfo = pathinfo(destination || filename),
ratio;
source.size(function(err, value) {
if (!value)
return;
imageWidth = value.width;
imageHeight = value.height;
crop = {
left: 0,
top: 0,
width: imageWidth,
height: imageHeight,
_paramCrop: crop
};
if (crop._paramCrop instanceof Object)
Object.assign(crop, crop._paramCrop);
source.autoOrient();
if (hasRotation)
source.rotate('black', rotation);
width = width || crop.width;
height = height || crop.height;
ratio = width / height;
if (hasCrop) {
source.crop(crop.width, crop.height, crop.left, crop.top);
}
var imageRatio = imageWidth / imageHeight;
if (crop._paramCrop === true) {
if (imageRatio >= ratio) {
crop.newWidth = crop.width / (crop.height / height);
crop.newHeight = height;
} else {
crop.newHeight = crop.height / (crop.width / width);
crop.newWidth = width;
}
crop.left = (crop.newWidth - width) / 2;
crop.top = (crop.newHeight - height) / 2;
if (crop.width < width || crop.height < height) {
crop.left = crop.width < width ? width/2 - crop.width/2 : 0;
crop.top = crop.height < height ? height/2 - crop.height/2 : 0;
crop.newWidth = crop.width;
crop.newHeight = crop.height;
}
source.resize(crop.newWidth, crop.newHeight, "!").crop(width, height, crop.left, crop.top);
} else if (crop.width > width && crop.height > height) {
var newRatio = crop.width / crop.height;
if (ratio > newRatio)
width = height * newRatio;
else
height = width / newRatio;
source.resize(width, height, "!");
}
source.quality(quality);
source.setFormat(destInfo.extension || 'png');
source.write(destination || filename, callback || emptyFn);
});
}
Fileuploader.prototype.mimeContentType = function(file) {
return mime.lookup(file);
}
Fileuploader.prototype.cleanChunkedFiles = function(directory, time = 3600000) {
fs.readdir(directory, function(err, files) {
(files || []).filter(file => /^\.unconfirmed\_/.test(file)).forEach(function(file, index) {
file = directory + file;
fs.stat(file, function(err, stat) {
if (err || stat.isDirectory())
return;
var now = new Date().getTime(),
endTime = new Date(stat.ctime).getTime() + time;
if (now > endTime)
return fs.unlink(file, emptyFn);
});
});
});
}
Fileuploader.prototype.upload = function(callback) {
var _ = this,
type_ = _.options.limit === 1 ? 'single' : 'array',
data = {
hasWarnings: false,
isSuccess: true,
warnings: [],
files: [],
_callback: callback,
_setStatus: function(status, warning, next) {
var data = this,
callback = data._callback;
if (status !== null) {
if (status === true) {
data.isSuccess = true;
} else {
data.isSuccess = false;
data.hasWarnings = true;
if (warning)
data.warnings.push(warning);
}
}
if (next && typeof callback == 'function') {
var isProcessing = false;
_.options.files.forEach(function(item) {
if (isset(item._processing)) {
item._processingCallback = function() {
delete item._processing;
delete item._processingCallback;
data._setStatus(null, null, true);
};
isProcessing = true;
}
});
if (isProcessing)
return;
delete data._callback;
delete data._setStatus;
callback(data);
}
}
};
_.multer[type_](_.field.name)(_.req, _.res, function (err) {
if (err)
return data._setStatus(false, {code: err.code, message: err.message}, true);
var files = type_ == 'single' ? [_.req.file] : _.req.files,
fields = _.req.body,
chunk = isset(fields) && isset(fields._chunkedd) && files.length == 1 && isJson(fields._chunkedd) ? JSON.parse(fields._chunkedd) : false,
v = validate_files.call(_, files);
_.field.input = files.length;
_.field.listInput = getListInputFiles.call(_, _.field.name);
if (v === true) {
if (chunk && files.length > 0) {
var file = files[0],
tmp = _.options.uploadDir + '.unconfirmed_';
if (isset(chunk.isFirst))
tmp += chunk.temp_name = filterFilename(file.filename);
else
tmp += filterFilename(chunk.temp_name);
if (!isset(chunk.isFirst) && !fs.existsSync(tmp))
return;
var w = fs.createWriteStream(tmp, {flags: 'a+'}),
r = fs.createReadStream(file.path);
w.on('close', function() {
unlinkTmp(file);
if (isset(chunk.isLast)) {
file.path = tmp;
file.filename = chunk.temp_name;
file.originalname = chunk.name;
file.mimetype = chunk.type || _.mimeContentType(tmp);
file.size = chunk.size;
handleUpload.call(_, files, data);
} else {
_.res.end(JSON.stringify({
fileuploader: {
temp_name: chunk.temp_name
}
}));
}
});
return r.pipe(w);
}
handleUpload.call(_, files, data);
} else {
data._setStatus(false, {code: v, message: error_messages[v]}, true);
}
files.forEach(function(file, key) {
unlinkTmp(file);
});
});
}
function handleUpload(files, data) {
var _ = this,
options = _.options,
listInput = _.field.listInput;
for(var i = 0; i<files.length; i++) {
var file = {
name: files[i].originalname,
tmp: files[i].path,
tmp_name: files[i].filename,
type: files[i].mimetype,
size: files[i].size
};
var listInputName = '0:/' + file.name,
fileInList = listInput === null || listInput.list.indexOf(listInputName) > -1,
nameInfo = pathinfo(file.name),
d = new Date();
file.oldname = file.name;
file.oldtitle = nameInfo.title;
file.extension = nameInfo.extension;
file.format = file.type.substr(0, file.type.indexOf('/'));
file.title = file.oldtitle;
file.size2 = formatSize(file.size);
file.name = generateFilename(options, file);
file.title = pathinfo(file.name).title;
file.file = options.uploadDir + file.name;
file.replaced = fs.existsSync(_.options.uploadDir + file.name);
file.date = d;
var valid = validate_files.call(_, file);
if (valid === true) {
if (fileInList) {
var fileListIndex = 0;
if (listInput) {
fileListIndex = listInput.list.indexOf(listInputName);
file.listProps = listInput.values[fileListIndex];
listInput.list.splice(fileListIndex, 1);
listInput.values.splice(fileListIndex, 1);
}
data.files.push(file);
}
} else {
if (!fileInList)
continue;
data.files = [];
data._setStatus(false, {code: valid, message: parseVariables(error_messages[valid] || valid, file)});
break;
}
}
if (!data.hasWarnings) {
data.files.forEach(function(file, key) {
if (options.move_uploaded_file(file)) {
file.uploaded = true;
delete file.chunked;
delete file.tmp;
delete file.tmp_name;
options.files.push(file);
} else {
data.files.splice(key, 1);
}
});
}
if (listInput)
options.files.forEach(function(item, index) {
if (!isset(item.listProps)) {
var fileListIndex = listInput.list.indexOf(item.file)
if (fileListIndex > -1)
item.listProps = listInput.values[fileListIndex];
}
if (isset(item.listProps)) {
delete item.listProps.file;
if (item.listProps.length == 0)
delete item.listProps;
}
});
editFiles.call(_, data);
sortFiles.call(_, data);
return data._setStatus(null, null, true);
}
function validate_files(data) {
if (data instanceof Array) {
if (this.options.required && data.length + this.options.files.length == 0)
return 'EMPTY_FIELD';
if (this.options.limit && data.length + this.options.files.length > this.options.limit)
return 'MAX_FILES_NUMBER';
if (this.options.maxSize && (data.reduce((a, b) => a + b.size, 0)+this.options.files.reduce((a, b) => a + b.size, 0))/1000000 > this.options.maxSize)
return 'MAX_SIZE';
} else {
if (this.options.extensions && (this.options.extensions.indexOf(data.extension) == -1 && !this.options.extensions.filter(function(val) { return val.indexOf(data.type) > -1 || val.indexOf(data.format + '/*') > -1 }).length))
return 'INVALID_TYPE';
if (this.options.disallowedExtensions && (this.options.disallowedExtensions.indexOf(data.extension) > -1 || this.options.disallowedExtensions.filter(function(val) { return val.indexOf(data.type) > -1 || val.indexOf(data.format + '/*') > -1 }).length))
return 'INVALID_TYPE';
if (this.options.fileMaxSize && data.size/1000000 > this.options.fileMaxSize)
return 'MAX_FILE_SIZE';
var v = typeof this.options.validate_file == 'function' ? this.options.validate_file(file, this.options) : true;
if (v !== true)
return v;
}
return true;
}
function extendDefaults(options, defaults) {
var _ = this,
obj = Object.assign({}, defaults, options || {});
obj.files.forEach(function(item, index) {
if (!item.type)
item.type = _.mimeContentType(item.relative_path || item.file);
item.appended = true;
});
return obj;
}
function fileFilter(req, file, cb) {
cb(null, true);
}
function getFileAttribute(file, attribute) {
var result = null;
if (isset(file.data) && isset(file.data[attribute]))
result = file.data[attribute];
if (isset(file[attribute]))
result = file[attribute];
return result;
}
function generateFilename(options, file, skipReplaceCheck) {
var conf = options.title instanceof Array ? options.title : [options.title],
type = conf[0],
length = isset(conf[1]) ? parseFloat(conf[1]) : 12,
random_name = random_string(length),
extension = file.extension,
d = new Date(),
result = '';
switch (type) {
case null:
case 'auto':
result = random_name;
break;
case 'name':
result = file.title;
break;
default:
var nameInfo = pathinfo(type);
result = type;
result = result.replace(/\{random\}/g, random_name);
result = result.replace(/\{timestamp\}/g, d.getTime());
result = result.replace(/\{date\}/g, d.getFullYear() + '-' + ('0' + (d.getMonth()+1)).slice(-2) + '-' + ('0' + d.getDate()).slice(-2) + '_' + ('0' + d.getHours()).slice(-2) + '-' + ('0' + d.getMinutes()).slice(-2) + '-' + ('0' + d.getSeconds()).slice(-2));
result = parseVariables(result, file);
if (!empty(nameInfo.extension)) {
type = result.substr(0, nameInfo.title.length);
extension = nameInfo.extension != '{extension}' ? nameInfo.extension : '';
}
}
if (!empty(extension) && new RegExp('\.' + extension + '$').test(result) == false)
result += '.' + extension;
if (!options.replace && !skipReplaceCheck) {
var t = file.title,
i = 1;
while (fs.existsSync(options.uploadDir + result)) {
file.title = t + ' ('+ i +')';
conf[0] = ['auto', 'name', '{random}'].indexOf(type) > -1 ? type : type + ' ('+ i +')';
result = generateFilename(options, file, true);
i++;
}
}
return filterFilename(result);
}
function getListInputFiles(fieldname) {
var inputName = 'fileuploader-list-' + fieldname,
fields = this.req.body,
result = null;
if (typeof this.options.listInput == 'string')
inputName = this.options.listInput;
if (fields && fields[inputName] && isJson(fields[inputName])) {
var data = {
list: [],
values: JSON.parse(fields[inputName]),
};
data.values.forEach(function(value, index) {
data.list.push(value.file);
});
result = data;
}
return result;
}
function editFiles(data) {
var _ = this,
options = _.options,
hasProperties = options.editor instanceof Object;
if (options.editor === false)
return;
options.files.forEach(function(item, index) {
var file = isset(item.relative_file) ? item.relative_file : item.file,
fields = _.req.body;
if (isset(item.listProps) && isset(item.listProps.editor))
item.editor = item.listProps.editor;
if (isset(item.uploaded) && isset(fields) && isset(fields._editorr) && isJson(fields._editorr) && _.field.input.length == 1)
item.editor = JSON.parse(fields._editorr);
if ((options.editor != null || isset(item.editor)) && fs.existsSync(file) && /^image\//.test(item.type)) {
var width = hasProperties ? options.editor.maxWidth : null,
height = hasProperties ? options.editor.maxHeight : null,
quality = hasProperties ? options.editor.quality : 90,
rotation = (isset(item.editor) ? item.editor.rotation : 0) || 0,
crop = (isset(item.editor) ? item.editor.crop : false) || (hasProperties ? options.editor.crop : false);
_.resize(file, width, height, null, crop, quality, rotation, function () {
delete item._processing;
if (item._processingCallback)
item._processingCallback();
});
item._processing = true;
delete item.editor;
}
});
}
function sortFiles(data) {
var _ = this,
files = _.options.files,
freeIndex = _.options.files.length,
compare = function(a, b) {
if (!isset(a.index)) {
a.index = freeIndex;
freeIndex++;
}
if (!isset(b.index)) {
b.index = freeIndex;
freeIndex++;
}
return a.index - b.index;
}
files.forEach(function(item, index) {
if (isset(item.listProps) && isset(item.listProps.index))
item.index = item.listProps.index;
});
if (isset(files[0]) && isset(files[0].index))
files.sort(compare);
}
function parseVariables(text, file) {
text = text + "";
text = text.replace(/\{file_name\}/g, file.name);
text = text.replace(/\{file_size\}/g, file.size);
text = text.replace(/\{extension\}/g, file.extension);
return text;
}
function random_string(length) {
var possible = '_0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
text = '';
for (var i = 0; i < length; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
function pathinfo(name) {
var path = name.substr(0, name.lastIndexOf('/')),
extension = name.indexOf('.') != -1 ? name.split('.').pop().toLowerCase() : '',
title = name.substr(path.length + (!empty(path) ? 1 : 0), name.length - extension.length - (!empty(extension) ? 1 : 0));
return {path, title, extension};
}
function filterFilename(filename) {
var delimiter = '_',
invalidCharacters = /["<>#%\{\}\|\\\^~\[\]`;\?:@=&\*\/]/g;
filename = filename.replace(invalidCharacters, delimiter);
filename = filename.replace(new RegExp(delimiter + '{2,}', 'g'), delimiter);
return filename;
}
function formatSize(bytes) {
if (bytes == 0) return '0 Byte';
var k = 1000,
sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
i = Math.floor(Math.log(bytes) / Math.log(k));
return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
}
function unlinkTmp(file) {
fs.unlink(file.tmp || file.path, emptyFn);
}
function isJson(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
function isset(ref) {
return typeof ref !== 'undefined';
}
function empty(ref) {
return (ref + "").length === 0;
}
module.exports = function() {
return new Fileuploader(...arguments);
}

View File

@@ -0,0 +1,27 @@
{
"name": "fileuploader",
"version": "2.2.0",
"description": "Validate, Remove, Upload, Sort files and Resize images on server.",
"private": true,
"main": "fileuploader.js",
"engines": {
"node": ">=4.0.0"
},
"dependencies": {
"gm": "^1.23.1",
"mime-types": "^2.1.21",
"multer": "^1.4.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"fileuploader",
"javascript",
"plugin",
"innostudio.de"
],
"author": "innostudio.de",
"license": "https://innostudio.de/fileuploader/documentation/#license"
}

View File

@@ -0,0 +1,5 @@
{
"require": {
"aws/aws-sdk-php": "*"
}
}

View File

@@ -0,0 +1,287 @@
<?php
# ======================================================================== #
#
# Title [PHP] FileUploader Amazon S3
# Author: innostudio.de
# Website: http://innostudio.de/fileuploader/
# Version: 2.2
# License: https://innostudio.de/fileuploader/documentation/#license
# Date: 23-Nov-2019
# Purpose: Manage files on Amazon S3 server
#
# ======================================================================== #
use Aws\S3\S3Client;
use Aws\S3\MultipartUploader;
use Aws\S3\Exception\S3Exception;
use Aws\Common\Exception\MultipartUploadException;
class FileUploader_S3 extends FileUploader {
private $Client;
private $Bucket;
private $Folder;
private $tmpDir;
public function __construct($name, $options = null) {
if (is_array($name))
return $this->initClient($name);
if (isset($options['auth']) && $this->initClient($options['auth'])) {
$options['files'] = $this->listFiles($this->Folder);
unset($options['auth']);
}
return parent::__construct($name, $options);
}
public function upload() {
$data = parent::upload();
foreach($this->options['files'] as $key=>&$item) {
if (isset($item['uploaded']) && file_exists($item['file'])) {
$index = array_search($item, $data['files']);
if (!$this->getOptions()['replace']) {
$title = $item['title'];
$i = 1;
while($this->fileExists($this->Folder . $item['name'])) {
$item['title'] = $title . " ({$i})";
$item['name'] = $item['title'] . '.' . $item['extension'];
$i++;
}
}
$object = $this->Folder . $item['name'];
$result = $this->uploadFile($item['file'], $object);
@unlink($item['file']);
if ($result) {
$item['file'] = $result;
$item['data']['key'] = $object;
if ($index !== false)
$data[$index] = $item;
} else {
unset($this->options['files'][$key]);
if ($index !== false)
unset($data[$index]);
}
}
unset($item['listProps']['file']);
if (empty($item['listProps']))
unset($item['listProps']);
}
return $data;
}
protected function editFiles() {
foreach($this->options['files'] as $key=>&$item) {
if (!isset($item['uploaded']) && isset($item['data']['key']) && isset($item['listProps']['editor']) && strpos($item['type'], 'image/') !== false) {
$destination = $this->options['uploadDir'] . time() . '.' . pathinfo($item['name'], PATHINFO_EXTENSION);
$this->downloadFile($item['data']['key'], $destination);
$item['relative_file'] = $destination;
$item['_tempEdit'] = true;
}
}
parent::editFiles();
foreach($this->options['files'] as $key=>&$item) {
if (isset($item['_tempEdit']) && isset($item['data']['key']) && isset($item['relative_file'])) {
$this->uploadFile($item['relative_file'], $item['data']['key']);
@unlink($item['relative_file']);
unset($item['relative_file']);
unset($item['_tempEdit']);
}
}
}
private function initClient($auth) {
try {
$data = array();
if (isset($auth['profile'])) {
$data['profile'] = $auth['profile'];
} else {
$data['credentials'] = array(
'key' => $auth['key'],
'secret' => $auth['secret'],
);
}
$data['region'] = isset($auth['region']) ? $auth['region'] : 'us-east-1';
$data['version'] = isset($auth['version']) ? $auth['version'] : 'latest';
if (isset($auth['endpoint']))
$data['endpoint'] = $auth['endpoint'];
$this->Client = S3Client::factory($data);
$this->Bucket = $auth['bucket'];
$this->Folder = isset($auth['folder']) && $auth['folder'] != '/' ? rtrim($auth['folder'], '/') . '/' : '';
return true;
} catch (S3Exception $e) {}
return false;
}
public function getClient() {
return $this->Client;
}
public function createBucket($bucket, $location = 'us-east-1', $acl = 'private') {
return $this->Client->createBucket(array(
'Bucket' => $bucket,
'LocationConstraint' => $location,
'ACL' => $acl
));
}
public function setBucket($bucket) {
$this->Bucket = $bucket;
}
public function bucketExists($bucket) {
return $this->Client->doesBucketExist($bucket);
}
public function listBuckets() {
$data = $this->Client->listBuckets();
$result = array();
foreach ($data['Buckets'] as $bucket) {
$result[] = $bucket['Name'];
}
return $result;
}
public function createFolder($path, $acl = 'public-read') {
return $this->Client->putObject(array(
'Bucket' => $this->Bucket,
'Key' => rtrim($path, '/') . '/',
'Body' => '',
'ACL' => $acl
));
}
public function setFolder($folder) {
$this->Folder = $folder;
}
public function folderExists($path) {
return $this->fileExists(rtrim($path, '/') . '/');
}
public function listFolders($path = null) {
$data = $this->Client->listObjects([
'Bucket' => $this->Bucket,
'Prefix' => $path != null ? $path : $this->Folder
]);
$result = array();
if (isset($data['Contents'])) {
foreach ($data['Contents'] as $object) {
if (!$this->isDir($object['Key']))
continue;
$result[] = basename($object['Key']);
}
}
return $result;
}
public function deleteFolder($path) {
return $this->deleteFile(rtrim($path, '/') . '/');
}
public function uploadFile($tmp, $file, $acl = 'public-read') {
try {
if (filesize($tmp) < 104857600) {
$uploader = $this->Client->putObject(
array(
'Bucket' => $this->Bucket,
'Key' => $file,
'SourceFile' => $tmp,
'ACL' => $acl
)
);
} else {
$multipartUploader = new MultipartUploader($this->Client, $tmp, [
'bucket' => $this->Bucket,
'key' => $file,
'acl' => $acl
]);
$uploader = $multipartUploader->upload();
}
gc_collect_cycles();
return $uploader['ObjectURL'];
} catch (S3Exception $e) { }
return false;
}
public function fileExists($file) {
return $this->Client->doesObjectExist($this->Bucket, $file);
}
public function getFileUrl($file) {
return $this->Client->getObjectUrl($this->Bucket, $file);
}
public function listFiles($path = null) {
$data = $this->Client->listObjects([
'Bucket' => $this->Bucket,
'Prefix' => $path != null ? $path : $this->Folder
]);
$result = array();
if (isset($data['Contents'])) {
foreach ($data['Contents'] as $object) {
if ($this->isDir($object['Key']))
continue;
$result[] = array(
'name' => basename($object['Key']),
'size' => $object['Size'],
'type' => self::mime_content_type($object['Key']),
'file' => $this->getFileUrl($object['Key']),
'data' => array(
'key' => $object['Key'],
'readerCrossOrigin' => 'anonymous'
)
);
}
}
return $result;
}
public function downloadFile($file, $destination) {
return $this->Client->getObject([
'Bucket' => $this->Bucket,
'Key' => $file,
'SaveAs' => $destination,
]);
}
public function deleteFile($file) {
return $this->Client->deleteObject(array(
'Bucket' => $this->Bucket,
'Key' => $file
));
}
private function isDir($key) {
return substr($key, -1) == '/';
}
}
FileUploader::$S3 = 'FileUploader_S3';