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:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user