diff --git a/examples/issues/pr876/controllers.js b/examples/issues/pr876/controllers.js deleted file mode 100644 index b482077..0000000 --- a/examples/issues/pr876/controllers.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; -angular - .module('app', ['angularFileUpload']) - .controller('AppController', ['$scope', 'FileUploader', function ($scope, FileUploader) { - var uploader = $scope.uploader = new FileUploader({ - url: '../upload.php' - }); - - $scope.upload = function () { - var items = uploader.getNotUploadedItems(); - if (items.length == 0) { - console.log("No files to upload"); - return false; - } - - for (var i = 0; i < items.length; i++) { - var fileItem = changeFileName(items[i], ""); - fileItem.upload(); - } - }; - - function changeFileName(fileItem, newFileName) { - newFileName = newFileName || "file" + new Date().getTime(); - - var fileName = fileItem.file.name.split('.'); - if (fileName.length < 2) { - alert("Uploaded file must have a valid extension! For more information see the Supported Formats") - } - var fileExtension = "." + fileName.pop(); - fileItem.file.name = newFileName + fileExtension; - return fileItem; - } - }]); diff --git a/examples/issues/pr876/iframe.html b/examples/issues/pr876/iframe.html index 793f250..f9c6ab2 100644 --- a/examples/issues/pr876/iframe.html +++ b/examples/issues/pr876/iframe.html @@ -1,26 +1,19 @@ - + -
-