Created
September 23, 2012 10:35
-
-
Save klinkin/3769641 to your computer and use it in GitHub Desktop.
transloadit_example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base_layout.html" %} | |
{% block main %} | |
<div id="content" class="container page-content" style="padding-bottom: 228px;"> | |
<div class="row"> | |
<div class="span12>" id="content"> | |
<div> | |
<div class="row"> | |
<div class="span7" id="details"> | |
<div> | |
<form id="MyForm" action="http://api2.transloadit.com/assemblies" enctype="multipart/form-data" method="POST"> | |
<input type="hidden" name="params" value="{"auth":{"key":"e5ce476bd6e2425e83d4559d507bb4a1"},"template_id":"89287b0c2a8f434fa74ad584fdda5198","redirect_url":"http://admin.happyfire.ru/upload"}" /> | |
<input type="file" name="my_file" /> | |
<input type="submit" value="Upload"> | |
</form> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
{% endblock %} | |
{% block js %} | |
{{ super() }} | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript" src="//assets.transloadit.com/js/jquery.transloadit2.js"></script> | |
<script type="text/javascript"> | |
// We call .transloadit() after the DOM is initialized: | |
$(document).ready(function() { | |
$('#MyForm').transloadit({ | |
wait: true | |
}); | |
}); | |
</script> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment