As opposed to Dropbox Chooser V2, V1 used a hidden input field making it easy for PHP to get POSTed data from form.
Using V2, however, the input fiels is gone. How do I get the POST data to further process it?
As opposed to Dropbox Chooser V2, V1 used a hidden input field making it easy for PHP to get POSTed data from form.
Using V2, however, the input fiels is gone. How do I get the POST data to further process it?
Basically two main options:
Rough example of the latter (completely untested, sorry for typos/bugs):
<form method="POST" action="...">
<input id="url" name="url" type="hidden" />
<div id="container"></div>
</form>
<script>
var button = Dropbox.createChooseButton({
linkType: 'direct',
success: function (files) {
document.getElementById('url').value = files[0].link;
}
});
document.getElementById('container').appendChild(button);
</script>