What does your upload.php look like?
Image uploader uploading file size
I've created a page where you can drag and drop your image to be uploaded. The issue I'm having is that when I drag an image to the upload section I get the filesize of that image as well, so what happens is that when I save that image the filesize is saved along with the file name. Maybe someone can see where I went wrong.
I'm using this for the file upload http://hayageek.com/docs/jquery-upload-file.php
my create.blade.php
@extends('templates::layouts.admin')
@section('content')
<div class="row">
<div class="col-lg-12">
@if($errors->any())
<ul>
{{ implode('', $errors->all('<li class="error">:message</li>')) }}
</ul>
@endif
{{ Form::open(array('route' => 'admin.frames.store', 'class' => 'add-form')) }}
<div class="form">
<div class="title_input">
<div>
{{ Form::label('title', 'Title') }}
</div>
<div>
{{ Form::text('title','', array('id' => 'title', "class" => "form-control")) }}
</div>
</div>
<div class="content_input">
<div>
{{ Form::label('content', 'Content') }}
</div>
<div>
{{ Form::textarea('content','', array('id' => 'content', "class" => "form-control")) }}
</div>
</div>
<div class="image_uploader_test">
<div id="fileuploader_test">Upload</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#fileuploader_test").uploadFile({
url:'{{ asset("upload/upload.php") }}',
dragDrop:true,
multiple : true,
showFileCounter:false,
showDone: false,
fileName: "myfile",
allowedTypes:"jpg,png,gif,pdf",
returnType:"json",
showDelete:true,
});
});
</script>
<div class="submit_button">
{{ Form::submit('Submit', array("class" => "btn btn-info submit", "role" => "button")) }}
</div>
</div>
{{ Form::close() }}
</div>
</div>
@stop
if there is anything else you need me to provide please let me know.
I finally figured it out and I feel a bit silly. I had used the minified version of the jquery and I hadn't seen any documentation regarding the file size. So I went to the github for to check for an unminified version and I saw that the showFileSize was set to true and all I had to do was make it false. Sorry for all the trouble.
Please or to participate in this conversation.