hello guys, id like to integrate our chevereto instance in our forum.
the pup upload plugin doesnt work very well (for the small button integration in the editor - see McAtzes thread for details).
id like to have the following:
customizing the original button or adding a hardcoded button instead of sibling-method.
clicking on it will trigger the same popup as the original button, or directly the file-browser-window:
when a file is chosen, it is uploaded to the chevereto instance.
it would be great if the image is inserted dynamic like in the original uploader
but i would also be happy if only the bb-embed-code would be inserted.
how can i achieve this? can somebody point me in the right direction?
is this something to begin with or am i completely wrong?
thanks :-*
the pup upload plugin doesnt work very well (for the small button integration in the editor - see McAtzes thread for details).
id like to have the following:
customizing the original button or adding a hardcoded button instead of sibling-method.
clicking on it will trigger the same popup as the original button, or directly the file-browser-window:
when a file is chosen, it is uploaded to the chevereto instance.
it would be great if the image is inserted dynamic like in the original uploader
but i would also be happy if only the bb-embed-code would be inserted.
how can i achieve this? can somebody point me in the right direction?
is this something to begin with or am i completely wrong?
Code:
$requestData = [
'key' => 123456789,
'source' => 'file',
'format' => 'redirect'
];
$jsonData = json_encode($jsonData);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://cheveretoURL/api/1/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $jsonData,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
thanks :-*