I need to save files that I can already select in a modal using a js function. Below is the modal html
<div class="modal fade" id="modal_arquivo">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span></button>
<h4 class="modal-title">Selecione o arquivo</h4>
</div>
<div class="modal-body">
<div class="row">
<div id="painel_enviar_arquivo" class="col-sm-10 col-md-offset-1">
<form method="post" name="ajax_form" id="ajax_form">
<label>Arquivo</label>
<div class="input-group">
<label class="input-group-btn">
<span class="btn btn-primary">
Selecione… <input type="file" id="file_arquivo" accept="file_extension|image/*" name="file_arquivo" style="display: none;" >
</span>
</label>
<input type="text" class="form-control" readonly>
</div>
<input id="acao" name="acao" value="salva_arquivo" type="hidden" />
<input id="ex_users_arquivo" name="ex_users_arquivo" type="hidden" />
</form>
Try selecting one or more files and watch the feedback < / span> > "/ > Cancel Change
<div id="painel_btns_inserir">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Cancelar</button>
<button type="button" class="btn btn-primary" id="btn_modal_salvar_arquivo">Salvar</button>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
× Confirmation
Are you sure you want to leave this page? All unsaved data will be lost
Cancel Confirm