コントローラーに次のコードがあり、ドロップボックス チューザーから値を取得しています。
<?php class DropboxboxfilesController extends AppController {
public function add() {
if ($this->request->is('post')) {
$this->request->input('json_decode');
$this->Dropboxfile->create();
if ($this->Dropboxfile->save($this->request->data)) {
$this->Session->setFlash(__('Your file has been liberated :)'));
$this->redirect($this->referer());
} else {
$this->Session->setFlash(__('Something went wrong!'));
}
}
}}?>
ただし、チューザーの送信ボタンで送信を押したときに追加機能が存在しないというエラーが発生した場合。
私はいくつかのことを試しましたが、今のところ何も機能していないようです。
編集:コードを表示
<?php echo $this->Form->create('Dropboxfile', array ('array' => 'file')); ?>
<input type="dropbox-chooser" name="selected-file" style="visibility: hidden;"/>
<?php echo $this->Form->end('Finish'); ?>
私が使用しているドロップボックス コードhttps://www.dropbox.com/developers/dropins/chooser/js
編集
<form action="/cake/homes" array="file" id="DropboxfileIndexForm" method="post" accept- carset="utf-8"><div style="display:none;"><input type="hidden" name="_method" value="POST"/></div><input type="dropbox-chooser" name="selected-file" style="visibility: hidden;"/>
<div class="submit"><input type="submit" value="Finish"/></div></form