summaryrefslogtreecommitdiff
path: root/cgi-bin
diff options
context:
space:
mode:
Diffstat (limited to 'cgi-bin')
-rw-r--r--cgi-bin/thumbnail_upload4
-rwxr-xr-xcgi-bin/view2
2 files changed, 3 insertions, 3 deletions
diff --git a/cgi-bin/thumbnail_upload b/cgi-bin/thumbnail_upload
index 8ee9866..ab12c66 100644
--- a/cgi-bin/thumbnail_upload
+++ b/cgi-bin/thumbnail_upload
@@ -145,7 +145,7 @@ sub upload_to_AmazonS3{
sub error{
my $message = shift;
- my $resp = { success => "false", "error" => $message };
+ my $resp = { success => JSON::false, "error" => $message };
print JSON->new->encode($resp);
exit 1;
}
@@ -174,7 +174,7 @@ sub main{
error( "problem adding value to db");
}
my $resp = {
- success => "true",
+ success => JSON::true,
url => $thumbnail_url,
filesize => $filesize
};
diff --git a/cgi-bin/view b/cgi-bin/view
index f7435f3..d818519 100755
--- a/cgi-bin/view
+++ b/cgi-bin/view
@@ -6,7 +6,7 @@ use feature qw/switch/;
use CGI;
my $IN = new CGI;
-print $IN->header();
+print $IN->header(-type => 'application/json');
our $json = JSON->new->allow_nonref;
my $sql_username = "asdfus";