How to input the image data from localstorage to the vaadin-upload?

85 views Asked by At

How to put the images from the localstorage to the vaadin-upload? I cannot find where the input from the vaadin-upload. Hope you may help me, thanks!

Vaadin-upload is working together with Polymer 3.0.

<vaadin-upload id="upload" no-auto></vaadin-upload>

--------
ready(){
   super.ready();

   var upload = this.$.upload;
   var files = upload.files;

   var newImage = JSON.parse(localStorage.newAttachment);
   var maxImage = newImage.length;
   for(var i = 0; i < maxImage; i++) {
      files.indexOf(localStorage.getItem(newImage[i].data));
   }
}

It displays none.

0

There are 0 answers