Questions tagged [angularjs-fileupload]

For questions related to uploading files with AngularJS and `

For answers related to uploading files with AngularJS, see

The <input type="file" needs a custom directive. See,

When using the FormData API to POST files and data, it is important to set the Content-Type header to undefined. See,

AngularJS Upload related libraries

28 questions
308
votes
29 answers

File Upload using AngularJS

Here is my HTML form:
I want to upload an image from local machine and want to read the content of the uploaded file. All…
Aditya Sethi
  • 10,486
  • 11
  • 26
  • 31
292
votes
13 answers

ng-model for `` (with directive DEMO)

I tried to use ng-model on input tag with type file: But after selecting a file, in controller, $scope.vm.uploadme is still undefined. How do I get the selected file in my controller?
Endy Tjahjono
  • 24,120
  • 23
  • 83
  • 123
144
votes
7 answers

AngularJS: how to implement a simple file upload with multipart form?

I want to do a simple multipart form post from AngularJS to a node.js server, the form should contain a JSON object in one part and an image in the other part, (I'm currently posting only the JSON object with $resource) I figured I should start with…
Gal Ben-Haim
  • 17,433
  • 22
  • 78
  • 131
33
votes
4 answers

AngularJS Uploading An Image With ng-upload

I am trying to upload a file in AngularJS using ng-upload but I am running into issues. My html looks like this:
Devin Dixon
  • 11,553
  • 24
  • 86
  • 167
6
votes
2 answers

How to get file content and other details in AngularJS

How can I get file content while I click on submit button. I'm getting only first and second input. Please refer to snippet: !DOCTYPE html>
Mohammed
  • 648
  • 2
  • 12
  • 32
4
votes
1 answer

How to POST binary files with AngularJS (with upload DEMO)

unable to send file with angular post call I am trying to post .mp4 file with some data through ionic 1 with angular 1. While posting through POSTMAN it is fine and working. I am getting Success = false in my application. in POSTMAN, no headers and…
Mangrio
  • 1,000
  • 19
  • 41
3
votes
1 answer

Browser crashes when upload file with Angular

I am trying to upload files in JSON using angular and FileReader Api. The problem is that for files larger than 600 - 700 KB my browser crashes. As far as I can see the problem occurs when requesting against a resource and not when the file reader…
3
votes
1 answer

AngularJS Upload Multiple Files with FormData API

I need to upload image and video files to the server in an Angular application using Laravel 5.1 as the back end. All Ajax requests need to go to the Laravel controller first, and we have the code there for how the file gets handled when it gets…
2
votes
0 answers

Angularjs Fileupload change upload URL?

I use angular to upload the file as below : If I run the following code, I get 403(Forbidden) var contextRoot = "http://localhost\\:6060/nomunoli"; ... ... uploadFile : function(taglist, description, userid, file) { return $upload.upload({ …
Zaw Than oo
  • 9,651
  • 13
  • 83
  • 131
1
vote
1 answer
1
vote
1 answer

show the file names and allow user to remove the files before submitting the form

I am working on a web page where user need to upload files and send them along with some message.. First thing i noticed is when we want to upload a file or send an attachment(single or multiple) we need to use below line of code:
user8373379
  • 77
  • 2
  • 8
1
vote
1 answer

Laravel storing only one file from multiple file upload file using AngularJS

Good morning or good evening (it depends whenever you read this topic). I wrote this code using angular and laravel to upload multiple files, but what i get from the request is only one file object, and all others are discharged, for this reason in…
1
vote
0 answers

Angular file-upload scope is getting undefined

here is directive. app.directive("fileInput", function($parse){ return{ link: function($scope, element, attrs){ element.on("change", function(event){ var files = event.target.files; …
1
vote
0 answers

Angularjs 1.5 file upload

I am using Angularjs 1.5, and trying to upload multiple files but in http request unable to send file data to java service, file data going as empty object. I am using the following directory to upload the multiple…
YYY
  • 3,440
  • 5
  • 20
  • 24
1
vote
2 answers

How to make POST requests with the FormData API

I want to pass the username and form_data object to the php file using http.post when i pass only form_data it works my picture upload. but i want to pass some other information like username as well. please help me how to pass other data in…
1
2