Elegir Android 480p30
Y en quality, bajarlo hasta que diga 26
Unable to start debugging on the web server. Connection Refused
No se porque ocurre.
Se puede solucionar creando un website en otro puerto, e indicarle en la ficha Web, dicha url
ej:
localhost:8083/SitioWeb
Se puede solucionar creando un website en otro puerto, e indicarle en la ficha Web, dicha url
ej:
localhost:8083/SitioWeb
Fileupload con bootstrap - soporta multiples archivos
1. Instalar
bootstrap
fileinput (de http://plugins.krajee.com/file-input)
jQuery
2. Agregar las referencias
<link href="/FileUp2/Content/themes/base/jquery-ui.css" rel="stylesheet"/>
<link href="/FileUp2/Content/bootstrap.css" rel="stylesheet"/>
<link href="/FileUp2/Content/bootstrap-theme.css" rel="stylesheet"/>
<script src="/FileUp2/Scripts/jquery-1.12.4.js"></script>
<script src="/FileUp2/Scripts/bootstrap.js"></script>
<script src="/FileUp2/Scripts/bootstrap-fileinput/js/fileinput.js"></script>
bootstrap
fileinput (de http://plugins.krajee.com/file-input)
jQuery
2. Agregar las referencias
<link href="/FileUp2/Content/themes/base/jquery-ui.css" rel="stylesheet"/>
<link href="/FileUp2/Content/bootstrap.css" rel="stylesheet"/>
<link href="/FileUp2/Content/bootstrap-theme.css" rel="stylesheet"/>
<script src="/FileUp2/Scripts/jquery-1.12.4.js"></script>
<script src="/FileUp2/Scripts/bootstrap.js"></script>
<script src="/FileUp2/Scripts/bootstrap-fileinput/js/fileinput.js"></script>
3. Agregar el codigo a la vista:
<div class="file-loading">
<input id="input-44" name="input44[]" type="file" multiple>
</div>
<script>
$(document).on('ready', function() {
$("#input-44").fileinput({
uploadUrl: '/FileUp2/Archivos/Subir',
maxFilePreviewSize: 10240
});
});
</script>
4. En el controller llamado Archivos, agregar el método Subir:
[HttpPost]
public ContentResult Subir()
{
HttpPostedFileBase hpf = null;
foreach (string file in Request.Files)
{
hpf = Request.Files[file] as HttpPostedFileBase;
if (hpf.ContentLength == 0)
continue;
string savedFileName = Path.Combine(Server.MapPath("~/App_Data"), Path.GetFileName(hpf.FileName));
hpf.SaveAs(savedFileName); // Save the file
}
// Returns json
return Content("{\"name\":\"" + hpf.FileName + "\",\"type\":\"" + hpf.ContentType + "\",\"size\":\"" + string.Format("{0} bytes", hpf.ContentLength) + "\"}", "application/json");
}
Suscribirse a:
Comentarios (Atom)