diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/mao-tutoring.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/mao-tutoring.js b/src/components/mao-tutoring.js index 936773a..887c078 100644 --- a/src/components/mao-tutoring.js +++ b/src/components/mao-tutoring.js @@ -149,7 +149,6 @@ class MaoTutoring extends connect(store)(PageViewElement) { #uploader { appearance: none; width: 100%; - margin: 10px; } </style> @@ -225,7 +224,7 @@ class MaoTutoring extends connect(store)(PageViewElement) { </vaadin-date-picker> <div class="picture-upload"> - <paper-input onchange="${() => this.uploadFile()}" id="pictureField" value="" label="Upload Picture With Trainee" type="file"></paper-input> + <paper-input onchange="${() => this.uploadFile()}" id="pictureField" label="Upload Picture With Trainee" type="file" accept="image/png, image/jpeg"></paper-input> <paper-progress value="0" max="100" id="uploader"></paper-progress> </div> @@ -350,9 +349,9 @@ class MaoTutoring extends connect(store)(PageViewElement) { uploadFile() { if(this.shadowRoot) { var uploader = this.shadowRoot.getElementById('uploader'); - var file = this.shadowRoot.getElementById('pictureField').files[0]; + var file = this.shadowRoot.getElementById('pictureField').inputElement.inputElement.files[0]; - store.dispatch() + store.dispatch(uploadPicture(file, uploader)); } } |
