pyc-website
main website for pyc inc.
git clone https://9o.is/git/pyc-website.git
commit 8b421fae1f99c535d0914f47f8522d2cfa34b6dc parent 9b38e63f16e02fb0a84c8965ad0df03959ccf8b2 Author: Jul <jul@9o.is> Date: Thu, 24 Jul 2014 15:23:01 -0400 ID upload now supports pdf Diffstat:
| M | src/main/scala/inc/pyc/rest/IdVerification.scala | | | 3 | ++- |
| M | src/main/webapp/app/App.js | | | 2 | +- |
| M | src/main/webapp/templates-hidden/parts/id-verification-form.html | | | 2 | ++ |
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/scala/inc/pyc/rest/IdVerification.scala b/src/main/scala/inc/pyc/rest/IdVerification.scala @@ -43,7 +43,8 @@ object IdVerificationUpload extends RestHelper with Logger { * Only allow images of types: jpeg, png, svg */ def imgInvalid(file: FileParamHolder) = ! List( - "image/jpeg", "image/png", "image/svg+xml").exists(_ == file.mimeType) + "image/jpeg", "image/png", "image/svg+xml", "application/pdf", + "application/x-pdf", "application/x-bzpdf", "application/x-gzpdf").exists(_ == file.mimeType) /** * The maximum amount of files allowed in memory per user. diff --git a/src/main/webapp/app/App.js b/src/main/webapp/app/App.js @@ -232,7 +232,7 @@ app.controller('IdVerificationCtrl', ['$scope', '$controller', '$rootScope', '$f $scope.uploader.filters.push(function(item) { var type = $scope.uploader.isHTML5 ? item.type : '/' + item.value.slice(item.value.lastIndexOf('.') + 1); type = '|' + type.toLowerCase().slice(type.lastIndexOf('/') + 1) + '|'; - return '|jpg|png|jpeg|svg|'.indexOf(type) !== -1; + return '|jpg|png|jpeg|pdf|'.indexOf(type) !== -1; }); // file must be less than 5 MB (5243000 bytes) diff --git a/src/main/webapp/templates-hidden/parts/id-verification-form.html b/src/main/webapp/templates-hidden/parts/id-verification-form.html @@ -11,6 +11,8 @@ <input type="text" readonly=""></input> <b class="tooltip tooltip-top-left">Click browse and upload your identification document.</b> <small class="help-block"> + Only JPEG, PNG and PDF are allowed to be uploaded. + <br/><br/> Identification should be either: <ul class="list-unstyled"> <li>- Driver's License</li>