hi @RachidLaasri but files are uploading still.
Jan 8, 2015
5
Level 1
Dropzone send additional data
I have just incorporated dropzone.js into my page and created one instance with
<form class="dropzone dz-clickable" method="POST" action="{{ URL::route('upload-url') }}">
<input type="text" name="task_id" value="{{ $taskid }}">
<div class="dz-message">
<h4>Drag Photos to Upload</h4>
<span>Or click to browse</span>
</div>
</form>
no i want to upload each file and save it in my database with relevant task id.
but i dont understand how will i know if its sending taskid or not ? because in console there is nothing.
here is my controller code:
public function uploadfile(){
$data = Input::all();
print_r($data);
$file = Input::file('file');
$destinationPath = '/files';
$filename = $file->getClientOriginalName();
$extension = $file->getClientOriginalExtension();
$uploadSuccess = $file->move($destinationPath, $filename);
if( $uploadSuccess ) {
return Response::json('success', 200);
} else {
return Response::json('error', 400);
}
}
Please or to participate in this conversation.