Download FineUploader 5 and include it in your template. Connect the endpoint
property to the dynamic route _uploader_{mapping_name}
. This example is based on the UI Mode of FineUploader.
<link href="fine-uploader/fine-uploader-new.min.css" rel="stylesheet">
<script type="text/javascript" src="fine-uploader/fine-uploader.min.js"></script>
<script type="text/javascript">
var uploader = new qq.FineUploader({
element: document.getElementById('fine-uploader'),
request: {
endpoint: "{{ oneup_uploader_endpoint('gallery') }}"
}
});
</script>
<div id="fine-uploader"></div>
You can find a fully example of all available settings on the official documentation.
If you are using Fine Uploader UI, as described in this example, you MUST include a template in your document/markup. You can use the default.html
file in the templates directory bundled with the FineUploader library and customize it as desired. You even can use an inline template. See the official styling documentation page for more details.
Configure the OneupUploaderBundle to use the correct controller:
# app/config/config.yml
oneup_uploader:
mappings:
gallery:
frontend: fineuploader
Be sure to check out the official manual for details on the configuration.
After this setup, you can move on and implement some of the more advanced features. A full list is available here.