Vimeo API 파일업로드 , 비메오 API를 이용해 웹상에서 바로 업로드 VimeoUploadException Unable to initiate an upload 해결
<form action="./vimeo_upload_todb.html" method="POST" id="form201" enctype="multipart/form-data">
<input type="file" name="my_field_add" value="" class="form-control" id="fi_pic">
<input type="submit" value="save" name="saveUniv" class="btn btn-primary">
</form>
<?php
$client_id = "e68c98bafasdfasdfce06f28a5edd9a7eec735191520";
$client_secret = "cit3jXeAGeI5b/kl87quFBNVafefasdfasdfasdfoBs+fmi0un/L1hgwQcvJaakCIgEpEh1UJGjSOTGR08uTLdUIqlBHRcpukGkLTLBKni0vOk3ess";
$access_token = "c33c66asdfefa9fasdf08abd90a1a5a15";
require '../../vendor/autoload.php';
use Vimeo\Vimeo;
$client = new Vimeo($client_id, $client_secret, $access_token);
$file_name = realpath($_FILES['my_field_add']['tmp_name']);
$uri = $client->upload($file_name, array(
"name" => "Success",
"description" => "The description goes here."
));
echo "Your video URI is: " . $uri;
?>
댓글 영역