clear file input after its uploaded
parent
59e3b4b456
commit
5cd697ab92
|
@ -143,6 +143,7 @@ function post_reply(id){
|
|||
document.getElementById('reply-form-body-'+id).value = ''
|
||||
document.getElementById('message-reply-'+id).innerHTML = ''
|
||||
ToggleReplyBox('reply-message-'+id)
|
||||
document.getElementById('file-upload').value = null;
|
||||
} else {
|
||||
showToast(false, getMessageFromJsonData(false, data));
|
||||
}
|
||||
|
@ -179,6 +180,7 @@ function comment_edit(id){
|
|||
bs_trigger(commentForm);
|
||||
document.getElementById('filename-edit-reply-' + id).innerHTML = '<i class="fas fa-file"></i>';
|
||||
document.getElementById('comment-edit-body-' + id).value = data["body"];
|
||||
document.getElementById('file-edit-reply-'+id).value = null;
|
||||
}
|
||||
else {
|
||||
showToast(false, getMessageFromJsonData(false, data));
|
||||
|
@ -239,6 +241,7 @@ function post_comment(fullname, wall_user_id, hide){
|
|||
document.getElementById('form-preview-'+fullname).innerHTML = ''
|
||||
document.getElementById('charcount-'+fullname).innerHTML = ''
|
||||
document.getElementById('filename-show-reply-' + fullname).innerHTML = '<i class="fas fa-file"></i>';
|
||||
document.getElementById('file-upload-reply-'+fullname).value = null;
|
||||
}
|
||||
else {
|
||||
showToast(false, getMessageFromJsonData(false, data));
|
||||
|
|
|
@ -292,7 +292,7 @@ function changename(s1,s2) {
|
|||
if (files.length > 4)
|
||||
{
|
||||
alert("You can't upload more than 4 files at one time!")
|
||||
document.getElementById(s2).files = null
|
||||
document.getElementById(s2).value = null
|
||||
return
|
||||
}
|
||||
let filename = '';
|
||||
|
|
|
@ -72,7 +72,7 @@ document.onpaste = function(event) {
|
|||
for (const file of files)
|
||||
filename += file.name + ', '
|
||||
filename = filename.toLowerCase().slice(0, -2)
|
||||
document.getElementById('file-upload-submit').files = files;
|
||||
document.getElementById('file-upload-submit').value = files;
|
||||
document.getElementById('filename-show-submit').textContent = filename;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue