Turtle_Onni2015-12-21 19:40:44
Turtle_Onni, 2015-12-21 19:40:44

Angular and webApi how to send file along with object?

At the moment I have:

<div class="form-group">
            <div class="col-xs-12 col-sm-4">
                <select ng-model="doc.Type" class="form-control">
                    <option value="">--Тип--</option>
                    <option ng-repeat="typeDoc in typeOfDocs" value="{{typeDoc.title}}">{{typeDoc.title}}</option>
            <div class="col-xs-12 col-sm-6">
                <div class="form-inline">
                    <input type="file" file-uploader="myFile" class="form-control"/>
                    <button ng-click="uploadFile()" class="btn btn-default">Загрузить</button>

Uploading a single file to the server works fine. But it became necessary for me to send not only the file, but also some fields from the page. Please throw off examples of this procedure or where it is possible to look. Thanks a lot.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Mikhail Osher, 2015-12-21


Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question