upload from Model SDK (Angular)
furkansuv opened this issue · comments
Description/Steps to reproduce
I'm trying to upload attachement from Angular APP via Loopback SDK Model. Uploading from Postman it's working fine.
Loopback version:
├── @mean-expert/loopback-sdk-builder@2.3.1
├── loopback@3.25.1
├── loopback-boot@2.28.0
├── loopback-component-explorer@6.3.1
├── loopback-component-storage@3.6.1
├── loopback-connector-mssql@3.3.0
├── loopback-connector-mysql@5.4.0
Setups:
Server Model:
App Source:
test.component.html
`<form [formGroup]="form" (ngSubmit)="onSubmit()">
test.component.ts
constructor(
private _attachement:AttachmentApi
) { }
//Create form
form(mitglied: Mitglied) {
form = this.fs.group({
'file': ['']
})
}
//send to loopback server
onSubmit(){
this._attachement.upload('demo', this.form.value.file)
.toPromise()
.then(res => {console.log(res)} )
}
Once I submit the form, on Google Chrome Dev tools Network shows the upload "pending" and after 4 Minutes it fails:
Could you please help me?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS
file at the top-level of this repository.