Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
{{set . "title" "画像アップロード"}}
<img src="{{ .profileImgUrl }}" class="thumb"/>
{{template "header.html" .}}
<form class="form_img_upload" method="POST" enctype="multipart/form-data" onSubmit="return upload(this);">
<input type="file" name="imgFile" accept="image/jpeg,image/gif,image/png"/>
<button class="ajax_execute" data-form="form_img_upload" data-action="/img/upload_execute" data-mode="img_upload">アップロード</button>
<script type="text/javascript" src="/public/js/ajax.js"></script>
<script type="text/javascript" src="/public/js/jquery.uploadThumbs.js"></script>
<script type="text/javascript">
$(function() {
// jQuery Upload Thumbs
$('.form_img_upload input:file').uploadThumbs({
position : 2, // 0:before, 1:after, 2:parent.prepend, 3:parent.append,
// any: arbitrarily jquery selector
imgbreak : false // append <br> after thumbnail images
{{template "footer.html" .}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment