|
@@ -1,7 +1,7 @@
|
|
-<!-- Load Uppy CSS bundle. It is advisable to install Uppy
|
|
|
|
|
|
+<!-- Load Uppy CSS bundle. It is advisable to install Uppy
|
|
from npm/yarn instead, and pick and choose the plugins/styles you need.
|
|
from npm/yarn instead, and pick and choose the plugins/styles you need.
|
|
But for experimenting, you can use Transloadit’s CDN, Edgly: -->
|
|
But for experimenting, you can use Transloadit’s CDN, Edgly: -->
|
|
-<link rel="stylesheet" href="https://transloadit.edgly.net/releases/uppy/v1.22.0/uppy.min.css">
|
|
|
|
|
|
+<link rel="stylesheet" href="https://releases.transloadit.com/uppy/v1.22.0/uppy.min.css">
|
|
|
|
|
|
<div class="UppyDragDrop"></div>
|
|
<div class="UppyDragDrop"></div>
|
|
<div class="for-ProgressBar"></div>
|
|
<div class="for-ProgressBar"></div>
|
|
@@ -12,11 +12,11 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- Load Uppy JS bundle. -->
|
|
<!-- Load Uppy JS bundle. -->
|
|
-<script src="https://transloadit.edgly.net/releases/uppy/v1.22.0/uppy.min.js"></script>
|
|
|
|
-<script src="https://transloadit.edgly.net/releases/uppy/locales/v1.16.9/ru_RU.min.js"></script>
|
|
|
|
|
|
+<script src="https://releases.transloadit.com/uppy/v1.22.0/uppy.min.js"></script>
|
|
|
|
+<script src="https://releases.transloadit.com/uppy/locales/v1.16.9/ru_RU.min.js"></script>
|
|
<script>
|
|
<script>
|
|
- var uppy = Uppy.Core({
|
|
|
|
- debug: true,
|
|
|
|
|
|
+ var uppy = Uppy.Core({
|
|
|
|
+ debug: true,
|
|
autoProceed: true,
|
|
autoProceed: true,
|
|
locale: Uppy.locales.ru_RU
|
|
locale: Uppy.locales.ru_RU
|
|
});
|
|
});
|
|
@@ -30,15 +30,15 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- uppy.use(Uppy.ProgressBar, {
|
|
|
|
|
|
+ uppy.use(Uppy.ProgressBar, {
|
|
target: '.for-ProgressBar',
|
|
target: '.for-ProgressBar',
|
|
- hideAfterFinish: false
|
|
|
|
|
|
+ hideAfterFinish: false
|
|
});
|
|
});
|
|
uppy.use(Uppy.Tus, { endpoint: 'https://master.tus.io/files/' });
|
|
uppy.use(Uppy.Tus, { endpoint: 'https://master.tus.io/files/' });
|
|
uppy.on('upload-success', function (file, response) {
|
|
uppy.on('upload-success', function (file, response) {
|
|
var url = response.uploadURL
|
|
var url = response.uploadURL
|
|
var fileName = file.name
|
|
var fileName = file.name
|
|
-
|
|
|
|
|
|
+
|
|
document.querySelector('.uploaded-files ol').innerHTML +=
|
|
document.querySelector('.uploaded-files ol').innerHTML +=
|
|
'<li><a href="' + url + '" target="_blank">' + fileName + '</a></li>'
|
|
'<li><a href="' + url + '" target="_blank">' + fileName + '</a></li>'
|
|
});
|
|
});
|