1
Hello, I’m making an administrative website, in this site will have the option to upload photo, the user could upload up to 3 photos.
My idea was to make kind of facebook, where you click and add the photo of the post, the problem and I wanted as soon as the photo was added it already appeared in a preview.
This is my view:
<div class="row">
<div class="col-lg-2"></div>
<div class="col-md-8">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Nova Publicação</h3>
</div>
<!-- /.box-header -->
<!-- form start -->
<form role="form">
<div class="box-body">
<div class="form-group">
<label for="exampleInputEmail1">Título</label>
<input type="text" class="form-control" id="produtoTitulo" placeholder="Digite o titulo da publicação...">
</div>
<div class="form-group">
<label>Descrição (até 1000 caracteres)</label>
<textarea id="produtoDescricao" placeholder="Digite a descrição do produto..." class="textarea" style="width: 100%; height: 125px; font-size: 14px; line-height: 18px; border: 1px solid rgb(221, 221, 221); "></textarea>
</div>
<div class="form-group" style="margin-top:20px">
<label for="exampleInputFile">Máximo de 3 Fotos</label>
<input type="file" id="exampleInputFile">
<p class="help-block">Resolução máxima : 1200x1200px</p>
</div>
<div class="box-footer">
<button type="submit" id="btnSubmit" class="btn btn-primary">Publicar</button>
<a href="@Url.Action("Produto","Index", new {area="Lojista"})" class="btn btn-warning">Voltar</a>
</div>
</form>
</div>
<div class="col-lg-2"></div>
</div>
I was trying with this example inputfile , you click and select the photo , but I needed the option to select 3 images and still show a preview in some box.
I’m completely clueless as to how to do this I can barely explain what I’d like.
If anyone can help me I’d be grateful.
I will test and look at your code but thanks for the help , soon I return to give an answer.
– William Cézar
Cool guy was that same , I think I’ll have some more doubts when I will have to post , I realized that the delete button ta a little strange ,but anything I put here , thank you very much I’ll put your answer as right, Valew guy.
– William Cézar
Opa qq thing goes commenting... The delete button was actually an image...then left only the x...
– MagicHat