This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var express = require('express') | |
| , app = express() | |
| , fs = require('fs'); | |
| // Routes | |
| app.get('/form', function(req, res) | |
| { | |
| fs.readFile('./form.html', function(error, content) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Error: .get() requires callback functions but got a [object Undefined] | |
| at Router.route.Route.sensitive (/home/dileep/node_modules/express/lib/router/index.js:252:11) | |
| at Array.forEach (native) | |
| at Router.route (/home/dileep/node_modules/express/lib/router/index.js:248:13) | |
| at Router.methods.forEach.Router.(anonymous function) [as get] (/home/dileep/node_modules/express/lib/router/index.js:270:16) | |
| at Function.methods.forEach.app.(anonymous function) [as get] (/home/dileep/node_modules/express/lib/application.js:412:26) | |
| at Object.<anonymous> (/home/dileep/workspace/erp/app.js:25:5) | |
| at Module._compile (module.js:449:26) | |
| at Object.Module._extensions..js (module.js:467:10) | |
| at Module.load (module.js:356:32) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var tmp_path = req.files.uploadimgs.path; | |
| // set where the file should actually exists - in this case it is in the "images" directory | |
| var target_path = './upload/work/' + req.files.uploadimgs.name; | |
| // move the file from the temporary location to the intended location | |
| fs.rename(tmp_path, target_path, function(err) { | |
| if (err) throw err; | |
| console.log('cfgh'); | |
| // delete the temporary file, so that the explicitly set temporary upload dir does not get filled with unwanted files | |
| fs.unlink(tmp_path, function() { | |
| if (err) throw err; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var uuid=require('node-uuid'); | |
| var tmp_path = req.files.uploadimgs.path,uuid; | |
| console.log(uuid); | |
| // set where the file should actually exists - in this case it is in the "images" directory | |
| var target_path = './upload/work/' +req.files.uploadimgs.name+uuid(); | |
| // move the file from the temporary location to the intended location | |
| fs.rename(tmp_path, target_path, function(err) { | |
| if (err) throw err; | |
| console.log('cfgh'); | |
| // delete the temporary file, so that the explicitly set temporary upload dir does not get filled with unwanted files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var tmp_path = req.files.uploadimgs.path,uuid; | |
| var target_path = './upload/work/'+uuid() +'.png'; | |
| if(req.files) | |
| { | |
| mkdirp(newDir,0777,function(err){ | |
| if(err) throw err; | |
| }) | |
| } | |
| if(req.files) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| easyimg.resize({src:'./upload/work/abcd.png', dst:'./upload/work/abcd-small.png', width:50, height:50}, function(err, stdout, stderr) { | |
| if (err) throw err; | |
| console.log('Resized to 50x50'); | |
| }); | |
| shows error me like |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <title>Infinite Carousel</title> | |
| <style type="text/css" media="screen"> | |
| <!-- | |
| body { font: 1em "Trebuchet MS", verdana, arial, sans-serif; font-size: 100%; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ExifImage = require('exif').ExifImage; | |
| var easyimg= require('easyimage'); | |
| var path = require('path'); | |
| var uuid=require('node-uuid'); | |
| var tmp_path = req.files.uploadimgs.path,uuid; | |
| console.log(uuid); | |
| fs.exists('/upload/work',function(exists){ | |
| fs.mkdir('./upload/work',function() { | |
| var target_path = './upload/work/'+uuid() +'.png'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ExifImage = require('exif').ExifImage; | |
| var easyimg= require('easyimage'); | |
| var path = require('path'); | |
| var uuid=require('node-uuid'); | |
| var tmp_path = req.files.uploadimgs.path,uuid; | |
| console.log(uuid); | |
| fs.exists('/upload/work',function(exists){ | |
| fs.mkdir('./upload/work',function() { | |
| var target_path = './upload/work/'+uuid() +'.png'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dileep@dileep-VirtualBox:~/Downloads/JMongoBrowser-linux-all_1-1-1$ java -jar JMongoBrowser.jar | |
| Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError | |
| at com.edgytech.swingfast.ButtonBase.xmlPostLoadComponentCallback(ButtonBase.java:344) | |
| at com.edgytech.swingfast.XmlComponentUnit.xmlPostLoadCallback(XmlComponentUnit.java:423) | |
| at com.edgytech.swingfast.XmlUnit.xmlLoad(XmlUnit.java:903) | |
| at com.edgytech.swingfast.XmlUnit.xmlLoad(XmlUnit.java:804) | |
| at com.edgytech.swingfast.XmlUnit.xmlLoad(XmlUnit.java:779) | |
| at com.edgytech.swingfast.XmlUnit.xmlCreateAndAddChild(XmlUnit.java:668) | |
| at com.edgytech.swingfast.XmlUnit.addAllChildren(XmlUnit.java:1270) | |
| at com.edgytech.swingfast.XmlUnit.structure(XmlUnit.java:1196) |