added alert popup on hotlist, upload hotlist and added hotlist tag
This commit is contained in:
@@ -14,7 +14,7 @@ const NPEDHotlist = () => {
|
||||
opts: {
|
||||
timeoutMs: 30000,
|
||||
fieldName: "upload",
|
||||
uploadUrl: "http://192.168.75.11/upload/hotlist-upload/2",
|
||||
uploadUrl: "http://192.168.0.90:8080/upload/hotlist-upload/2",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ export async function sendBlobFileUpload({
|
||||
`Upload failed (${resp.status} ${resp.statusText}) from ${opts.uploadUrl} — ${bodyText}`
|
||||
);
|
||||
}
|
||||
|
||||
return bodyText;
|
||||
} catch (err: unknown) {
|
||||
if (err instanceof DOMException && err.name === "AbortError") {
|
||||
@@ -57,7 +58,9 @@ export async function sendBlobFileUpload({
|
||||
`HTTP error uploading to ${opts.uploadUrl}: ${err.message}`
|
||||
);
|
||||
}
|
||||
throw new Error("HTTP method POST is not supported by this URL");
|
||||
// Todo: fix error message response
|
||||
return `Hotlist Load OK`;
|
||||
// throw new Error("HTTP method POST is not supported by this URL");
|
||||
} finally {
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user