8000 Merge pull request #365 from abdi42/master · abcdmitry/laravel-filemanager@d594091 · GitHub
[go: up one dir, main page]

Skip to content

Commit d594091

Browse files
authored
Merge pull request UniSharp#365 from abdi42/master
Showing message to user when file successfully uploaded
2 parents 1f19d67 + 70294de commit d594091

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

public/js/script.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ $('#upload-btn').click(function () {
5858
success: function (data, statusText, xhr, $form) {
5959
resetUploadForm();
6060
refreshFoldersAndItems(data);
61+
displaySuccessMessage(data);
6162
},
6263
error: function (jqXHR, textStatus, errorThrown) {
6364
displayErrorResponse(jqXHR);
@@ -156,6 +157,12 @@ function displayErrorResponse(jqXHR) {
156157
notify('<div style="max-height:50vh;overflow: scroll;">' + jqXHR.responseText + '</div>');
157158
}
158159

160+
function displaySuccessMessage(data){
161+
if(data == 'OK'){
162+
notify('File Uploaded Successfully');
163+
}
164+
}
165+
159166
var refreshFoldersAndItems = function (data) {
160167
loadFolders();
161168
if (data != 'OK') {

0 commit comments

Comments
 (0)
0