@krauserman wrote:
Hello, i have big problem with a module of my app, i need to upload an array of files from my app like this way:
By the side of ionic i use this:
My provider method that get the local system url
resolveLocalUri(filePath:any){ return this.file.resolveLocalFilesystemUrl(filePath) }By the sife of my page i convert each photo to file
for(var k = 0 ; k < this.photos.length; k++){ var filePhoto = (<FileEntry>await this.nativeProvider.resolveLocalUri(this.photos[k])) filePhoto.file(file=>{ this.files.push(file) }) }My uploader service
const formData = new FormData(); let headers = new HttpHeaders(); headers = headers.append('Authorization',token) //const reader = new FileReader(); //reader.onloadend = ()=>{ for(let i = 0; i < files.length; i++){ formData.append(fileKey, files[i], files[i]['name']) } //} return this.http.post(this.url+params,formData,{headers:headers})But nothing
Some help please
Posts: 1
Participants: 1

