From fef2b0538981ec5fcb6c8b91f1bfceac24a9e43e Mon Sep 17 00:00:00 2001 From: Jules Date: Sun, 26 Jan 2014 04:39:12 -0500 Subject: updates to cgis --- cgi-bin/thumbnail_upload | 4 ++-- cgi-bin/view | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cgi-bin') 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"; -- cgit v1.2.3-70-g09d2