Closed willwade closed 7 years ago
@willwade Can you elaborate?
In https://github.com/openassistive/OpenATBackend/blob/master/js/services/index.js#L52 need something like
{ name: 'httpfile', baseUrl: '/[^/]*(?:openat\.md)$', prefix: '', projectPath: { skip: 0, take: 1 } },
And then in js/services/httpfile.js
`'use strict'; var contentCreator = require('../functions'); var toMarkdown = require('to-markdown');
exports.handler = function(req, res, next) { var url = req.projectUrl;
var http = require('http'); var request = http.get(url); // download file // validate md // convert to json
return res .status(500) .json({ error: "Sorry. There was problems retrieving the information."}); }; `
(thats psudocode obviously!)
How about projects to add a file in their repo (thinking of github) and we can check that file... instead of new url like package.json/bower.json and then we can implement submit with cmd. I'm not sure about other services
Pass in a URL. If ends with _openat.md then deal with it. This would be the same format as a item post.
Instead of _openat.md
i will set .md
, only the extension. for it to work on a situation in #3
Done.
image_download
variable
Pass in a URL. If ends with _openat.md then deal with it. This would be the same format as a item post.