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
<div class="container"> | |
<div class="panel panel-default"> | |
<div class="panel-heading">Profile</div> | |
<div class="panel-body"> | |
<legend><i class="ion-clipboard"></i> Edit My Profile</legend> | |
<form method="post" ng-submit="updateProfile()"> | |
<div class="form-group"> | |
<label class="control-label">Profile Picture</label> | |
<img class="profile-picture" ng-src="{{ user.user_avatar || 'http://placehold.it/100x100'}}"> | |
</div> |
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
app.controller('LogoutCtrl', function($location, $auth, toastr) { | |
if (!$auth.isAuthenticated()) { return; } | |
$auth.logout() | |
.then(function() { | |
toastr.info('You have been logged out'); | |
$location.path('/'); | |
}); | |
}); |
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
<!-- Main container for About Page View --> | |
<div class="container"> | |
<div class="panel panel-default"> | |
<div class="panel-heading">Definition of Yourtube</div> | |
<div class="panel-body"> | |
<div class="row"> | |
<div class="col-sm-6"> | |
<h5>Definition Of Yourtube</h5> | |
<p>Yourtube.com is an online directory of videos just for you. Learn how to build your own youtube. |
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
var User = require('../models/user.server.model'), | |
cloudinary = require('cloudinary'), | |
multiparty = require('multiparty'); | |
module.exports = { | |
/** | |
* Upload a video to Yourtube's Cloudinary Server | |
* @param req |
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
<div class="container"> | |
<div class="panel panel-default"> | |
<div class="panel-heading">Upload Video</div> | |
<div class="panel-body"> | |
<div id="direct_upload" | |
ngf-drop="uploadFiles($files)" | |
ngf-drag-over-class="dragOverClass($event)" | |
ng-model="files" | |
ng-multiple="false"> | |
<h4>New Video</h4> |
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
app.controller('UploadController', ['$scope', '$rootScope', '$location', 'Upload', 'cloudinary', '$http', | |
/* Uploading with Angular File Upload */ | |
function($scope, $rootScope, $location, Upload, cloudinary, $http) { | |
$scope.uploadFiles = function(files){ | |
$scope.files = files; | |
if (!$scope.files) return; | |
angular.forEach(files, function(file){ | |
if (file && !file.$error) { |
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
var mongoose = require('mongoose'), | |
videoSchema = mongoose.Schema({ | |
title: { type: String }, | |
public_id: { type: String, required: true }, | |
description: { type: String, required: true }, | |
url: { type: String, required: true }, | |
duration: { type: Number, required: true }, | |
format: { type: String, required: true }, | |
time_uploaded: { type: Date, default: Date.now } | |
}); |
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
var Video = require('../models/video.server.model'); | |
module.exports = { | |
/** | |
* Saves A New Video Details Posted By User | |
* @param {void} req | |
* @param {void} res | |
* @param {Function} next | |
* @return {object} | |
*/ |
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
app.controller('HomeController', ['$scope','$http','toastr','User', 'Video', function($scope, $http, toastr, User, Video) { | |
$scope.listVideos = function(){ | |
Video.retrieveAll().then(function(response){ | |
$scope.allVideos = response.data; | |
}); | |
}; | |
$scope.listVideos(); | |
}]); |
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
app.filter("trustUrl", ['$sce', function ($sce) { | |
return function (recordingUrl) { | |
return $sce.trustAsResourceUrl(recordingUrl); | |
}; | |
}]); |