Skip to content
This repository
Browse code

fix exit issue

  • Loading branch information...
commit 53eeede241b16fe8595bcb5589759f3f5b4b3e51 1 parent 0aa2ed2
Alexander Shapiotko thousandsofthem authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 binary/phantom-nodejs/processor.js
6 binary/phantom-nodejs/processor.js
@@ -36,7 +36,7 @@ phantom.create(function(ph) {
36 36 } else {
37 37 page.render(output, function(){
38 38 console.log("page rendered to " + output);
39   - upload_file(ph, output);
  39 + upload_file(output);
40 40 });
41 41 }
42 42 });
@@ -44,7 +44,7 @@ phantom.create(function(ph) {
44 44 });
45 45
46 46
47   -var upload_file = function(ph, file_name){
  47 +var upload_file = function(file_name){
48 48 var file_data = fs.readFileSync(file_name);
49 49 var post_data = querystring.stringify({
50 50 'key' : 'd4864bbac09661b4722f6f02ec2e5146', // api key
@@ -71,7 +71,7 @@ var upload_file = function(ph, file_name){
71 71 var obj = JSON.parse(response); // imgur answers with json
72 72 var result = obj.upload.links;
73 73 console.dir(result); // this will contain the imgur links (image, imgur page, delete, etc.)
74   - ph.exit();
  74 + process.exit();
75 75 });
76 76 });
77 77 // post the data

0 comments on commit 53eeede

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