Use Express router for assets + "files" endpoints

I've split out the "file/upload" endpoint into its own module, and
renamed it to "files" to be consistent with the existing naming scheme.
This commit is contained in:
valadaptive
2023-12-04 12:40:53 -05:00
parent 414c9bd5fb
commit d24c1dde10
4 changed files with 286 additions and 253 deletions

View File

@ -152,7 +152,7 @@ export async function populateFileAttachment(message, inputId = 'file_form_input
*/
export async function uploadFileAttachment(fileName, base64Data) {
try {
const result = await fetch('/api/file/upload', {
const result = await fetch('/api/files/upload', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify({