Skip to content

Instantly share code, notes, and snippets.

@iMagdy
Created September 10, 2013 18:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iMagdy/6513261 to your computer and use it in GitHub Desktop.
Save iMagdy/6513261 to your computer and use it in GitHub Desktop.
Meteor file upload smart package, compatible with Meteor 0.6.5+, forked from http://stackoverflow.com/a/17893456
var connect = Npm.require('connect');
RoutePolicy.declare('/my-uploaded-content', 'network');
// Listen to incoming http requests
WebApp.connectHandlers.use('/my-uploaded-content', connect.static(process.env['APP_DYN_CONTENT_DIR']));
Package.describe({
summary: "Application file server."
});
Npm.depends({
connect: "2.7.10"
});
Package.on_use(function(api) {
api.use(['webapp', 'routepolicy'], 'server');
api.add_files([
'app-file-server.js',
], 'server');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment