We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello i get this error from Iron:Router if i click on a link.
Oops, looks like there´s no route on the client or the server for url: "http://localhost:12168/gridfs/fs/md5/10721db241a9b40a8482897da1f5cb23?download=true"
helper function: link: function() { return myFiles.baseURL + "/md5/" + this.md5; }, view: <a href="{{link}}?download=true" > {{shortFilename 56}} </a>
link: function() { return myFiles.baseURL + "/md5/" + this.md5; },
<a href="{{link}}?download=true" > {{shortFilename 56}} </a>
collection:
myFiles = new FileCollection( { resumable: true, // Enable built-in resumable.js chunked upload support resumableIndexName: 'test', maxUploadSize: 16777216, http: [ // Define HTTP route { method: 'head', path: '/md5/:md5', lookup: function (params, query) { return {md5: params.md5}; }, handler: function (req, res, next) { if (req.headers && req.headers.origin) { res.setHeader('Access-Control-Allow-Origin', req.headers.origin ); res.setHeader('Access-Control-Allow-Credentials', true); } next(); } }, { method: 'get', // Enable a GET endpoint path: '/md5/:md5', // this will be at route "/gridfs/myFiles/:md5" lookup: function (params, query) { // uses express style url params return { md5: params.md5 }; // a query mapping url to myFiles }, handler: function (req, res, next) { // if (req.headers && req.headers.origin) { res.setHeader('Access-Control-Allow-Origin', '*'); // For Cordova res.setHeader('Access-Control-Allow-Credentials', true); // } next(); } }, { method: 'put', // Enable a PUT endpoint path: '/md5/:md5', // this will be at route "/gridfs/myFiles/:md5" lookup: function (params, query) { // uses express style url params return {md5: params.md5}; // a query mapping url to myFiles }, handler: function (req, res, next) { if (req.headers && req.headers.origin) { res.setHeader('Access-Control-Allow-Origin', 'req.headers.origin'); // For Cordova res.setHeader('Access-Control-Allow-Credentials', true); } next(); } }, { method: 'post', // Enable a PUT endpoint path: '/md5/:md5', // this will be at route "/gridfs/myFiles/:md5" lookup: function (params, query) { // uses express style url params return {md5: params.md5}; // a query mapping url to myFiles }, handler: function (req, res, next) { if (req.headers && req.headers.origin) { res.setHeader('Access-Control-Allow-Origin', 'req.headers.origin'); // For Cordova res.setHeader('Access-Control-Allow-Credentials', true); } next(); } }, { method: 'options', // Enable an OPTIONS endpoint (for CORS) path: '/md5/:md5', // this will be at route "/gridfs/myFiles/:md5" lookup: function (params, query) { // uses express style url params return {md5: params.md5}; // a query mapping url to myFiles }, handler: function (req, res, next) { // Custom express.js handler for OPTIONS res.writeHead(200, { 'Content-Type': 'text/plain', 'Access-Control-Allow-Origin': 'req.headers.origin', // For Cordova 'Access-Control-Allow-Credentials': true, 'Access-Control-Allow-Headers': 'user-agent', 'Access-Control-Allow-Methods': 'PUT,POST, HEAD, GET' }); res.end(); return; } } ]});
The text was updated successfully, but these errors were encountered:
@MeteorFanatic Try adding target="_self" to the element (i.e. <a href="{{link}}?download=true" target="_self"> {{shortFilename 56}} </a>)
<a href="{{link}}?download=true" target="_self"> {{shortFilename 56}} </a>
Sorry, something went wrong.
Yes, @Dubbedge has the right solution. You can see this in the sample apps, for example: https://github.com/vsivsi/meteor-file-job-sample-app/blob/master/sample.html#L51
No branches or pull requests
Hello i get this error from Iron:Router if i click on a link.
helper function:
link: function() { return myFiles.baseURL + "/md5/" + this.md5; },
view:
<a href="{{link}}?download=true" > {{shortFilename 56}} </a>
collection:
The text was updated successfully, but these errors were encountered: