First I upload the video in my web server. Then i want to transfer the video to vimeo server.I have downloaded the code from vimeo given github URL (https://github.com/vimeo/vimeo.php). Using composer update the code. After that I am trying to create a custom library for CodeIgniter. In application/libraries folder put all files including 'vimeo.php' for library and in 'autoload.php' page under the 'application/config' folder set $autoload['libraries']=array('vimeo');. Now I call the library from controller
$lib = new Vimeo();
$video_url=base_url().''.$directory.''.$data['video_name'];
$uri = $lib->upload($video_url);
$video_data = $lib->request($uri);
$film_video = $lib->request('/ondemand/pages/myfilm'.$video_data['body']['uri'], array('type' => 'main'), 'PUT');
It shows error. The error is as follows:
An uncaught Exception was encountered
Type: VimeoUploadException
Message: Unable to locate file to upload.
I have checked the video file is present in the '$video_url' path.Could any one help me how to solve this problem.
Related
I have uploaded my .zip file of my game to Facebook Instant Games when an error pop up. It says "Game must reference to one of our supported SDKs via CDN."
I already put the script tag in head and body
<script src="https://connect.facebook.com/en_US/fbinstant.7.0.js"></script>
and my fbapp-config.json
{
"instant_games": {
"platform_version": "RICH_GAMEPLAY",
"orientation": "PORTRAIT",
"navigation_menu_version": "NAV_BAR"
}
}
I also tried the CLI method in uploading the .zip file, but also gets the same error saying I must refer to their SDK via CDN.
Can anyone please guide me.
Can you try this script tag instead?
<script src="https://connect.facebook.net/en_US/fbinstant.latest.js"></script>
This worked for me when I just tried uploading a .zip file now.
Try to change the SDK URL to the following:
https://www.facebook.com/assets.php/en_US/fbinstant.latest.js
This works for me.
I found it in a sample file, I have just downloaded from facebook.
I hope it helps!
right now i am trying to add a feature where the user can download the files uploaded by them through the URL,
I have tried this code sample:
html.AnchorElement anchorElement = new html.AnchorElement(href: "https://www.example.com/file/path/");
anchorElement.download = "https://www.example.com/file/path/";
anchorElement.click();
But it simply opens the file on the browser, which is not what i want, anyone got any other suggestions?
Here, I am using ckeditor and I want to upload an image using ckeditor.
I found link and I did like it says but I couldn't get button to upload an image for that.
Link is here for an image. My ckeditor version is CKEditor 4.5.6.
What can I do for upload an image?
Do remember that by default CKEditor does not include a file manager/uploader, so you need to integrate some server-side component to handle that. It can be either CKFinder (the file manager created by CKSource, the company behind CKEditor that can be easily integrated with the editor), some third-party product of your choice or your own solution.
Please refer to the CKEditor documentation about file upload - there is plenty of it, including samples with source code ready to copy and use in your own implementation:
File Upload through Dialogs and Drag&Drop sample
File Manager Integration documentation.
CKFinder Integration documentation
File Browser API - Creating a Custom File Manager documentation
CKFinder + CKEditor demo
Image upload in server and set url in ckeditor
https://stackblitz.com/edit/angular-ivy-jqy4ni <== demo link for angular
<ckeditor [editor]="editor"
[config]=" {
ckfinder: {
options: {
resourceType: 'Images'
},
uploadUrl: "BACK_END_MAPPING_URL_FOR_SAVE_IMG
},
}"
rows="6"> </ckeditor>
=> for back end use file name "upload"
Ex.
#RequestParam(value = "upload") List<MultipartFile> multipartFile
And response
FOR SUCCESS ================
{
"uploaded": true,
"url": "http://file/img/get_image_url.jpeg"
}
FOR ERROR ================
{
"uploaded": false,
"error": {
"message": "could not upload this image"
}
}
I have a PDF storred in a Blob
var pdfBlob = new Blob(buffers, {type: 'application/pdf'});
From that I create an Object URL
var pdfURL = URL.createObjectURL(pdfBlob);
That gives something like blob:chrome-extension%3A//mlbdgii.
If I manually copy the URL to a Chrome tab the PDF is successfully opened. However if I try to open it using chrome.app.window.create I just get a "This webpage is not found" error.
So the question is, can I open an Object URL using this method? If not, is there a workaround to get a PDF stored in an ObjectURL to be displayed in a Chrome App or Chrome Tab ?
Check out this: https://stackoverflow.com/a/27256841/3826713 , I had a similar issue and webview was my workaround for it.
i'm trying to learn how to get my own facebook & twitter wall status into flash so that I can export it out and install it in my iPhone.
After reading the facebook and twitter API documentation, I'm still very confussed on how to use them.
I'm very new to this and hope to get a suitable tutorial/sample code for some reference.
Help is appreciated. Thank you.
For Twitter it is easy. Just write the AS3 code to load the Twitter user RSS as XML. After that you will be able to use it.
var myXmlLoader:Loader = new Loader();
myXmlLoader.load(new URLRequest("http://twitter.com/statuses/user_timeline/#twitterUser.rss"));
// just replace "twitterUser" with your twitter user, leave all the rest as is
myXmlLoader.addEventListener(Event.COMPLETE, xmlLoadCompleted);
function xmlLoadComplete(evt){
var myWallData:XML = new XML(evt.target.data);
trace(myWallData); // you will get an RSS XML with the last 20 tweets from your account
}
To get an RSS from your Facebook wall you can use this:
https://www.facebook.com/feeds/page.php?id=23749877160&format=rss20
where 23749877160 is your Facebook account ID
that will give you an rss with your Facebook just as twitter does,
But you need some trick to load it with flash.
Locally you can load it and it works good using the same code to load the twitter,
but on the web your swf wont be able to load, some crossdomain issue.
To fix this what I did is a simple PHP file to load the rss and save a file with the loaded content.
PHP code:
<?php
set_time_limit(300); // this is to set the time limit to execute a code, is that the facebook wall take too long to load
$fbURL = "https://www.facebook.com/feeds/page.php?id=23749877160&format=rss20";
$fileName = "myFileName.xml"; // the name you want to do to your file, the file you will load with flash
$doc = new DOMDocument();
if($doc->load( $fbURL )){
$doc->save($fileName); // saving file in server folder
}else{
echo "error";
}
?>
This is cool but you need to execute the PHP file before intent to load the generated XML. you can use this code to do the trick
AS3 code:
var myPHPLoader:Loader = new Loader();
myPHPLoader.load(new URLRequest("xmlGenerator.xml"));
myPHPLoader.addEventListener(Event.COMPLETE, phpLoaded);
function phpLoaded(evt){
trace("PHP executed");
// do whatever you want
// after the php is executed you can load the fbXml generated normally
}
This works good, but keep in mind that the twitter rss and Facebook RSS, has a call limit per hour (150 call) for twitter, for Facebook I dont know. so if your app reach that limit before complete the hour it will call the empty xml or an error.
dont worry for Facebook in this example you have an PHP that will save the file just if it loads good, if the PHP dont loads the Facebook wall then it wont save the file, so your app will load the old fbXml.
Use the same php to load the twitter rss and save a file to be loaded from your flash app.
What I did is the follow.
PHP Code:
<?php
function savePlainRss($loadURL, $fileName){
set_time_limit(300);
$doc = new DOMDocument();
if($doc->load( $loadURL)){
$doc->save($fileName);
}
}
savePlainRss("https://www.facebook.com/feeds/page.php?id=23749877160&format=rss20", "myFacebookWall.xml");
savePlainRss("http://twitter.com/statuses/user_timeline/#twitterUser.rss", "myTwitterRSS.xml");
?>
This code will save an XML file for twitter rss and Facebook Wall but just if it can load it, if dont it will keep the old file.
Then from flash load the generated XML files.
For me to be sure my app wont reach the call limit and avoid twitter or facebook tag my app as spam, I did a cronjob on my Server to execute the PHP file
each 15 minutes so the calls to twitter and Facebook per hour is just 4, you can find help in google about how to do a cronjob, some hosting and web server have tools to do it.
you can do de calls each 5 minutes if you want more frequently updates or less, but keep in mind that the facebook load can take a long time, up to 300 seconds (5 minutes) dond use less than that to be sure you will have the complete work done.
Thanks for reading.
I hope it helps :)
had alook at it: http://developers.facebook.com/docs/guides/web/ look here for the API.
i dont want to post there code on here...
Also heres seems to have more info:
http://facebook-actionscript-api.googlecode.com/svn/release/current/docs/index.html
this is successful with actionScript, i learned something new
if i got time i will create a basic user status or something and let you know, for now i hoped i pushed you in the right direction.