F
F
Fayozzhon Berdiev2015-11-21 11:54:07
Angular
Fayozzhon Berdiev, 2015-11-21 11:54:07

How to upload file and data using Angularjs Restfull?

Good day dear colleagues!
Save my day off =)
The task is to create a designer of business cards, I made the form, everything works, only there is a problem with the upload.
Can't send file to server.
In angular I use the RestAngular library for convenience.
Please help with a recipe for ng to send multipart forms I will be very grateful.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
_
_ _, 2015-11-21
@CybernatiC

Use ng-file-upload, no one forbids uploading something other than restangular. The ideal option is to add a method to the object returned by the restangular, and do your dirty deeds in it through ng-file-upload

N
Nicholas, 2015-11-21
@healqq

Unfortunately, I am not familiar with the library, but to send using $http I did transformRequest in FormData, and in requestHeader I set content-type: undefined.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question