I'm having trouble getting the UIkit upload component working in my web application. I've included the upload component JS, placeholder css and form-file css.
The code straight from the examples in the docs doesn't even work for me.(With some minor alterations)
HTML
<div id="upload-drop" class="uk-placeholder">
<i class="uk-icon-cloud-upload uk-icon-medium uk-text-muted uk-margin-small-right"></i>
<input class="uk-form-file" id="upload-select" type="file" accept="image/*">
</div>
JS
$(function(){
var settings = {
action: 'app/components/Parts/upload.php'
};
var select = UIkit.uploadSelect($("#upload-select"), settings),
drop = UIkit.uploadDrop($("#upload-drop"), settings);
});
});
upload.php
<script>
document.location.href = "/test/#/;
</script>
I believe you can implement PHP logics from this article to work with UiKit's Javascript.
I've had the same problem, and it helped me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With