diff options
| author | Pepper <pepper@scannerjammer.com> | 2015-02-13 04:01:18 -0500 |
|---|---|---|
| committer | Pepper <pepper@scannerjammer.com> | 2015-02-13 04:01:18 -0500 |
| commit | 13ef227e89c49f4a4ae40c524cad441971f84afc (patch) | |
| tree | 518aff542c9502e6c22a5f47633ebf385b70a9c8 /saveImg.cgi | |
| parent | 32785e06cd47fc6c5c64c7e9c077769a462ae5ea (diff) | |
calling it done for now
Diffstat (limited to 'saveImg.cgi')
| -rw-r--r-- | saveImg.cgi | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/saveImg.cgi b/saveImg.cgi deleted file mode 100644 index 0447d61..0000000 --- a/saveImg.cgi +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/perl
-use strict;
-use CGI;
-use CGI::Carp qw ( fatalsToBrowser );
-use LWP::Simple;
-use MIME::Base64;
-
-##---------------------------------------------------------------------------------------
-##INPUT PARAMETERS THAT CAN BE CUSTOMIZED
-##---------------------------------------------------------------------------------------
-##Location of texture and heightmap files to be downloaded into
-my $outputDir="d:/tmp/files";
-##---------------------------------------------------------------------------------------
-##GET THE PICTURE NAME AND BASE64 DATA FROM THE HTTP POST REQUEST
-##---------------------------------------------------------------------------------------
-my $query = new CGI;
-##Get image name
-my $imageName = $query->param("name");
-if ( !$imageName )
- {
- ##Problem retrieving the data
- print $query->header ( );
- print "no";
- exit;
- }
-##Get encoded image
-my $encodedContents = $query->param("picture");
-if ( !$encodedContents )
- {
- ##Problem retrieving the data
- print $query->header ( );
- print "no";
- exit;
- }
-
-##---------------------------------------------------------------------------------------
-##GET HANDLE AND SAVE THE PICTURE CONTENTS TO THE OUTPUT DIR
-##---------------------------------------------------------------------------------------
-##Decode picture data
-my $decodedContents = decode_base64($encodedContents);
-
-##Save picture
-my $filename = $outputDir . "/" . $imageName;
-open(IMG,">$filename");
-binmode IMG;
-print IMG $decodedContents;
-close IMG;
-
-##---------------------------------------------------------------------------------------
-##PRINT SUCCESS IN HTML FORMAT
-##---------------------------------------------------------------------------------------
-print $query->header ( );
-print "yes";
-exit;
|
