angular-file-upload module not working without selecting a file
Opened this issue · 0 comments
nani44 commented
I need to send form data with file and without selecting a file. whenever i select file at that time data is sending to REST API , if i am not selecting file at that time form data is not sending to REST API. It's simply throwing error file.upload undefined. How to bypass file.upload data without selecting file time
Thank you.
file.upload = Upload.upload({
url: 'MyProject/UserDetails',
data: {'user': new Blob([JSON.stringify(user)],{type: "application/json"}), 'userFiles': file},
});