Skip to content

Commit

Permalink
Feature: Browser based notifications
Browse files Browse the repository at this point in the history
Added browser based notifications on successful file upload

Fixes issue NITDgpOS#38
  • Loading branch information
pranay414 authored and nkprince007 committed Dec 22, 2017
1 parent cb70b95 commit beff086
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/components/DropZone.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class DropZone extends Component {

constructor(props) {
super(props);
Notification.requestPermission();

// For a full list of possible configurations,
// please consult http://www.dropzonejs.com/#configuration
Expand All @@ -29,6 +30,9 @@ class DropZone extends Component {

success = (file, path) => {
FilesActions.updateFileList(path);
if(Notification.permission === 'granted') {
new Notification('File uploaded successfully');
}
}

render = () => {
Expand Down

0 comments on commit beff086

Please sign in to comment.