Skip to content
Browse files

corrected some small issues

  • Loading branch information...
1 parent e27f658 commit 3106ef48377031dab4808fc297e9e551363c0a39 @Lagaffe committed May 15, 2012
Showing with 11 additions and 3 deletions.
  1. +4 −0 README
  2. +5 −1 controllers/main.cfc
  3. +1 −1 views/main/protect.cfm
  4. +1 −1 views/main/upload.cfm
View
4 README
@@ -0,0 +1,4 @@
+
+Installation instructions:
+
+- update the "application.pathToPDFProtector" value on line 28 of the Application.cfc to point to the folder where you've installed PDFProtector
View
6 controllers/main.cfc
@@ -47,6 +47,10 @@ component
local.filename = local.UUID & ".pdf";
local.filePath = ExpandPath('../temp/#local.filename#');
local.pdf = new pdf();
+
+ if(!DirectoryExists(ExpandPath('../temp'))) {
+ DirectoryCreate(ExpandPath('../temp'));
+ }
fileCopy(ExpandPath('../repository/#arguments.file#'),local.filePath);
@@ -102,7 +106,7 @@ component
local.response.progress = "85%";
WSSendMessage(local.response);
}
-
+
local.pdf.thumbnail(source=local.filepath, format="png", pages="1", destination=ExpandPath('../temp/thumb-#local.UUID#/'));
local.response = StructNew();
View
2 views/main/protect.cfm
@@ -104,7 +104,7 @@
//JavaScript messageobject is converted to a string.
var message = messageObject;
if (message.type == "data") {
- var msg = $.parseJSON(message.data);
+ var msg = message.data;
$("#protectProgressBar").width(msg.PROGRESS);
var txt = $("#statusoverview").html();
switch (msg.TYPE) {
View
2 views/main/upload.cfm
@@ -89,7 +89,7 @@
//JavaScript messageobject is converted to a string.
var message = messageObject;
if (message.type == "data") {
- var msg = $.parseJSON(message.data);
+ var msg = message.data;
$("#uploadProgressBar").width(msg.PROGRESS);
var txt = $("#statusoverview").html();
switch (msg.TYPE) {

0 comments on commit 3106ef4

Please sign in to comment.
Something went wrong with that request. Please try again.