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
public class AmazonServiceException extends AmazonClientException { | |
private static final long serialVersionUID = 1L; | |
private String requestId; | |
private String errorCode; | |
private AmazonServiceException.ErrorType errorType; | |
private String errorMessage; | |
private int statusCode; | |
private String serviceName; | |
private String rawResponseContent; |
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 Files = require('../services/FileService'); | |
module.exports.deleteFile = function (req, res, next) { | |
var query = {createdBy: req.user._id, key: req.params.key}; | |
var file = req.params._id; | |
Files.remove(query, file, function (err) { | |
if (err) return next(err); | |
res.status(204).json({}); |
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'); | |
var fs = require('fs'); | |
var Busboy = require('busboy'); | |
var mime = require('mime'); | |
var tesseract = require('node-tesseract'); | |
var app = express(); | |
app.post('/upload', function(req, res) { | |
try { |
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
/** | |
* routes.js | |
* | |
* @description :: TODO: You might write a short summary of how this model works and what it represents here. | |
* @docs :: | |
*/ | |
var express = require('express'); | |
var router = express.Router(); |
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 Auth = require('../services/AuthService') | |
module.exports = { | |
login: function(req, res) { | |
Auth.login(req.body, function(err) { | |
if (err) return res.status(401).json({ | |
message: 'You are not authorized' | |
}) | |
res.status(200).json({ |