This file contains 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 async = require("async"); | |
var AWS = require("aws-sdk"); | |
var gm = require("gm").subClass({imageMagick: true}); | |
var fs = require("fs"); | |
var mktemp = require("mktemp"); | |
var THUMB_KEY_PREFIX = "thumbnails/", | |
THUMB_WIDTH = 150, | |
THUMB_HEIGHT = 150, | |
ALLOWED_FILETYPES = ['png', 'jpg', 'jpeg', 'bmp', 'tiff', 'pdf', 'gif']; |
This file contains 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
// dependencies | |
var async = require('async'); | |
var AWS = require('aws-sdk'); | |
// Enable ImageMagick integration. | |
var gm = require('gm').subClass({ imageMagick: true }); | |
var util = require('util'); | |
var pdf2png = require('pdf2png'); | |
pdf2png.ghostscriptPath = "/usr/bin"; | |
// constants |
This file contains 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
import functools | |
from channels.handler import AsgiRequest | |
from rest_framework.exceptions import AuthenticationFailed | |
from rest_framework.settings import api_settings | |
authenticators = [auth() for auth in api_settings.DEFAULT_AUTHENTICATION_CLASSES] | |