From 5add0a17c814a87e4f2b50a26fc5d4b330a10bf7 Mon Sep 17 00:00:00 2001 From: Josef Citrine Date: Mon, 2 May 2016 01:45:29 +0100 Subject: [PATCH] Added file upload button --- public/templates/uploader/index.html | 4 ++++ resources/assets/scripts/app/controllers/uploader.coffee | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/public/templates/uploader/index.html b/public/templates/uploader/index.html index bde8baee..db3a4be7 100644 --- a/public/templates/uploader/index.html +++ b/public/templates/uploader/index.html @@ -3,6 +3,10 @@

Drop files here to begin your upload!

+

Having issues with our uploader? Click the button below to upload your files.

+ +

+

Our preferred formats are FLAC, WAV, AIFF, and ALAC (because lossless audio is awesome) but we accept a few others, too. Each file can be up to 200 MB in size.

Tracks must be a minimum of 30 seconds long.

diff --git a/resources/assets/scripts/app/controllers/uploader.coffee b/resources/assets/scripts/app/controllers/uploader.coffee index 0d05dd40..ba56133c 100644 --- a/resources/assets/scripts/app/controllers/uploader.coffee +++ b/resources/assets/scripts/app/controllers/uploader.coffee @@ -18,4 +18,8 @@ module.exports = angular.module('ponyfm').controller "uploader", [ '$scope', 'auth', 'upload', '$state' ($scope, auth, upload, $state) -> $scope.data = upload + + $scope.fileChanged = (e) -> + files = e.files + $scope.$apply -> upload.upload files ]