You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've been searching any clue on how to properly use the container model generated for the sdk, I'm using angular 8 to try to upload to my loopback 3 server;
` onFileSelect(event) {
if (event.target.files.length > 0) {
const file = event.target.files[0].name;
const formData = new FormData();
var reader = new FileReader();
formData.append('file ',event.target.files[0]);
// console.log(formData)
for (var [key, value] of formData.entries()) {
console.log(key, value);
}
this si the html part where the user selects the file and then its supposed to upload it.
I can understand the first parameter on the upload method, but what exactly I'm supposed to put on the request parameter?
I made it work testing the server endpoint with insomnia, as a multipart form and having a parameter called 'file', selecting the file, submitting and it uploaded it perfectly, but now trying with the sdk I cant figure out what Im doing wrong, any idea?
The text was updated successfully, but these errors were encountered:
What type of issue are you creating?
What version of this module are you using?
Write other if any:
So I've been searching any clue on how to properly use the container model generated for the sdk, I'm using angular 8 to try to upload to my loopback 3 server;
` onFileSelect(event) {
if (event.target.files.length > 0) {
const file = event.target.files[0].name;
const formData = new FormData();
var reader = new FileReader();
formData.append('file ',event.target.files[0]);
// console.log(formData)
for (var [key, value] of formData.entries()) {
console.log(key, value);
}
}`
this is my component.ts
`
this si the html part where the user selects the file and then its supposed to upload it.
I can understand the first parameter on the upload method, but what exactly I'm supposed to put on the request parameter?
I made it work testing the server endpoint with insomnia, as a multipart form and having a parameter called 'file', selecting the file, submitting and it uploaded it perfectly, but now trying with the sdk I cant figure out what Im doing wrong, any idea?
The text was updated successfully, but these errors were encountered: