resolved most in browser errors and got maps stable. Next need to do some work on the save configuration stuff.

This commit is contained in:
2025-07-05 23:14:15 -06:00
parent 412ca36192
commit f4eefa1cae
6 changed files with 687 additions and 239 deletions

View File

@@ -61,8 +61,14 @@ async function uploadQRCodeToNocoDB(buffer, filename, config) {
});
try {
// Use the base URL without /api/v1 for v2 endpoints
const baseUrl = config.apiUrl.replace('/api/v1', '');
const uploadUrl = `${baseUrl}/api/v2/storage/upload`;
logger.info(`Uploading QR code to: ${uploadUrl}`);
const response = await axios({
url: `${config.apiUrl}/api/v2/storage/upload`,
url: uploadUrl,
method: 'post',
data: formData,
headers: {
@@ -74,9 +80,10 @@ async function uploadQRCodeToNocoDB(buffer, filename, config) {
}
});
logger.info('QR code upload successful:', response.data);
return response.data;
} catch (error) {
logger.error('Failed to upload QR code to NocoDB:', error);
logger.error('Failed to upload QR code to NocoDB:', error.response?.data || error.message);
throw new Error('Failed to upload QR code');
}
}