Questions tagged [ng-file-upload]

Lightweight AngularJS directive to upload files.

Lightweight AngularJS directive to upload files with optional FileAPI shim for cross browser support

Features:

  • file upload progress, cancel/abort
  • file drag and drop and paste images (html5 only)
  • resumable uploads: pause/resume upload (html5 only)
  • image resize (html5 only)
  • validation on file type/size, image width/height, video/audio duration and ng-required support.
  • show thumbnail or preview of selected images/audio/videos
  • supports CORS and direct upload of file's binary data using Upload.$http()
  • plenty of sample server side code, available on nuget
  • on demand flash FileAPI shim loading no extra load for html5 browsers.
  • HTML5 FileReader shim for IE8-9

Github page: https://github.com/danialfarid/ng-file-upload

495 questions
3
votes
2 answers

how to preview image before upload using ngx-file-drop in angular 6?

I'm using "file-drop" tag to drag and drop image on Angular 6.
Hyder Nadeem
  • 31
  • 1
  • 3
3
votes
2 answers

Angular 5 Upload files along other object's properties

I want to upload a file as part of a property to an object in a form. I have researched on this but most of the documentations are referring to services which only handle a file. In my scenario I have a form in which alongside other text inputs and…
Efron A.
  • 353
  • 3
  • 10
  • 19
3
votes
0 answers

multer stop file upload immediate on validation fail

I am working on mean stack application and I face one issue with file uploading. I want to stop all uploading immediately as soon as the global.isProcessKilled variable is true. My code is as bellow photo.js var express = require("express"); var app…
laxman
  • 1,338
  • 2
  • 10
  • 27
3
votes
2 answers

How to get the filename of the uploaded file in ng-file-upload

I am using angularjs and the ng-file-upload to upload a file to a server. I want to get the file name so that I can save it with the same name in the server. After uploading I see the file name near the "choose file" button, but I want to set the…
Abhi
  • 1,512
  • 2
  • 22
  • 46
3
votes
0 answers

Problems with implementation of chunked upload using ng-file-upload

I am looking for solution how to implement chunked upload with ng-file-upload I read in documentation that I can set chunk size by resumeChunkSize: 10000 or '10KB' or '10MB' But also I have to implement the following promise: resumeSize:…
3
votes
1 answer

Angular JS Image validation max size and valid format

I want to show different validation message for maximum size and invalid format in image upload. Here is my code, but max size validation is not working,show only invalid file format validation. Here is my code.
Kirit
  • 405
  • 3
  • 18
3
votes
1 answer

How to disable submit in AngularJS in following scenario?

I am having some trouble with disabling Submit button in a HTML form in AngularJS. Scenario: I am selecting a certain process from a HTML Select Box ie. Drop Down List Once I select some entry from that, the lower portion is automatically…
theHeman
  • 505
  • 1
  • 6
  • 26
3
votes
1 answer

TypeError: Upload.upload is not a function

I have this function, and it throw exception: $scope.uploadAvatar = function(avatar, user) { Upload.upload({ url: 'api/v1/user' + user.id + '/', avatar: avatar, method: 'put' }) }; TypeError: Upload.upload is not a…
Random Name
  • 387
  • 1
  • 6
  • 16
3
votes
1 answer

Upload multiple files with dynamic form data bound to each file using multer, ng-file-upload, angular and node

I’m using angular, and ng-file-upload on the client side. I’m using node, express, and multer on the server side. When a user selects multiple files, I show a preview of the files along with a textarea that is bound to the model. This purpose of…
Matthew Moran
  • 1,457
  • 12
  • 22
3
votes
0 answers

How to write Unit Test for controller which uses ng-file-upload

I am using jasmine and karma for my front end unit testing of angularjs application.I am couldn't able to figure out how to write test cases that cover progress and success callbacks after calling upload method in ng-file-upload .thanks in…
3
votes
2 answers

nodejs write simple image blob - Upload.dataUrltoBlob

Simple question. How do I save a image blob in Nodejs from angular. AngularSide: $scope.upload = function (dataUrl, picFile) { Upload.upload({ url: 'http://test.dev:3000/register/user/uploads', data: { file:…
philipfwilson
  • 757
  • 2
  • 9
  • 21
3
votes
0 answers

Testing abort ng-file-upload with protractor

While uploading a file with ng-file-upload I like to test (with protractor) if cancelling it works. However, during upload no assertions and actions are evaluated, and only after the upload is done the test will fail. That's because I'm expecting…
3
votes
0 answers

Uploading large file using ng-file-upload and handling it to server side using hapijs

I have hapi js server at backend. I am uploading file using ng-file-upload. When I handled the file at hapi server it thrown an error: "TypeError: Uncaught error: Cannot read property 'content-length' of undefined" My code is: config: { …
Kedar H
  • 41
  • 2
  • 9
3
votes
1 answer

How to save images under a specific folder s3?

I am currently able to upload files under the root bucket in s3, however I would like to specify the folder to which it should save. Appending folder name to the url produces a 405. Upload $scope.s3upload = function(file) { Upload.upload({ …
user3397395
3
votes
1 answer

Content-Disposition with ng-file-upload and angularjs

Background: I am using ng-file-upload to submit two files in separate ngf-selects and also a Javascript object literal. The issue i have is that when the request is sent the content-disposition of all the parts is set to form-data but what i would…
Graham
  • 651
  • 2
  • 10
  • 23
1 2
3
32 33