This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Given a string containing any combination of YouTube and Vimeo video URLs in | |
* a variety of formats (iframe, shortened, etc), each separated by a line break, | |
* parse the video string and determine it's valid embeddable URL for usage in | |
* popular JavaScript lightbox plugins. | |
* | |
* In addition, this handler grabs both the maximize size and thumbnail versions | |
* of video images for your general consumption. In the case of Vimeo, you must | |
* have the ability to make remote calls using file_get_contents(), which may be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* we are going to upload file to s3 via node js by using | |
* aws-sdk - required | |
* busboy - required | |
* uuid - optional - for image renaming purpose | |
* with this library you can upload any kind of file to s3 via node js. | |
*/ | |
const AWS = require('aws-sdk'); | |
const UUID = require('uuid/v4'); |