diff options
| author | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-13 15:20:25 -0400 |
|---|---|---|
| committer | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-13 15:20:25 -0400 |
| commit | c2810d32f5a6234c3b30b2fb709c6fdbab04f0d1 (patch) | |
| tree | f39dfe250922305f028f60a008acc042bfdc2166 /src/components | |
| parent | f32d184caca594c71fa7b947ae12ea991b1fc031 (diff) | |
Fixed most bugs and now able to upload file to firebase cloud storage.
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)); } } |
