늦게 합류했지만, 이전에 nodejs용 서드파티 discourse-api를 작성한 적이 있습니다:
이 라이브러리를 사용하면 업로드를 쉽게 생성할 수 있습니다. 이렇게 하면 됩니다:
const { DiscourseApi } = require("node-discourse-api");
const api = new DiscourseApi("https://discourse.example.com");
api.options.api_username = "API_USERNAME";
api.options.api_key = "API_KEY";
api.createUpload(file_path_or_buffer, { filename: "filename" })
(참고: 이 라이브러리는 완성된 것이 아닙니다)