Created
September 10, 2013 18:10
-
-
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
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 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'])); |
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
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