angular-file-upload: additional properties/options to each file in a multi-file upload?

Issue

I’m using nervgh’s angular-file-upload, https://github.com/nervgh/angular-file-upload/wiki/Module-API.

Is there a way to use the angular-file-upload and allow additional properties to each file when doing a multi-file upload?

I’m using their image sample to start out with: http://nervgh.github.io/pages/angular-file-upload/examples/image-preview/

Trying to add a boolean to each file that the user can set and then I use that on the server side when it’s picked up.

Solution

You can use formData property shown in Properties section to send to server whatever you need.

  • formData {Array}: Data to be sent along with the files.

If you’re using PHP in server side, I think this post can help you out.

Answered By – herbert

Answer Checked By – Gilberto Lyons (AngularFixing Admin)

Leave a Reply

Your email address will not be published.