|
|
|
@ -1068,7 +1068,7 @@ select.gender_pick {border: 1px solid #d1d1d1;
|
|
|
|
|
|
|
|
|
|
|
|
<div class="upload-section">
|
|
|
|
<div class="upload-section">
|
|
|
|
<input type="file" id="fileInput" accept="image/*" multiple>
|
|
|
|
<input type="file" id="fileInput" accept="image/*" multiple>
|
|
|
|
<button id="uploadBtn">Upload</button>
|
|
|
|
<!-- <button id="uploadBtn">Upload</button> -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="progress-section" id="progressSection" style="display: none;">
|
|
|
|
<div class="progress-section" id="progressSection" style="display: none;">
|
|
|
|
@ -1163,13 +1163,31 @@ select.gender_pick {border: 1px solid #d1d1d1;
|
|
|
|
// console.info('json: ', json);
|
|
|
|
// console.info('json: ', json);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('#uploadBtn').on('click', function(e) {
|
|
|
|
// $('#uploadBtn').on('click', function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
// e.preventDefault();
|
|
|
|
const files = $('#fileInput')[0].files;
|
|
|
|
// const files = $('#fileInput')[0].files;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (files.length === 0) {
|
|
|
|
|
|
|
|
// e.preventDefault();
|
|
|
|
|
|
|
|
// alert('Please select a file.');
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $('#progressSection').show();
|
|
|
|
|
|
|
|
// $('#uploadBtn').prop('disabled', true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// startUpload(files, function() {
|
|
|
|
|
|
|
|
// $('#progressSection').hide();
|
|
|
|
|
|
|
|
// $('#uploadBtn').prop('disabled', false);
|
|
|
|
|
|
|
|
// $('#fileInput').val('');
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#fileInput').on('change', function(e) {
|
|
|
|
|
|
|
|
const files = e.target.files;
|
|
|
|
|
|
|
|
|
|
|
|
if (files.length === 0) {
|
|
|
|
if (files.length === 0) {
|
|
|
|
e.preventDefault();
|
|
|
|
console.info('Please select a file.');
|
|
|
|
alert('Please select a file.');
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|