cleanup
This commit is contained in:
1 parent
b20c87cabc
commit
cc8d4bc98c
2 files changed
+4
-1
No files matched your search
@@ -8,7 +8,6 @@ const useCreateStatusPage = () => {
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [networkError, setNetworkError] = useState(false);
|
||||
|
||||
const createStatusPage = async ({ form }) => {
|
||||
setIsLoading(true);
|
||||
try {
|
||||
|
||||
@@ -890,6 +890,10 @@ class NetworkService {
|
||||
responseType: "blob",
|
||||
});
|
||||
fd.append("logo", imageResult.data);
|
||||
// Cleanup blob
|
||||
if (form.logo.src.startsWith("blob:")) {
|
||||
URL.revokeObjectURL(form.logo.src);
|
||||
}
|
||||
}
|
||||
|
||||
return this.axiosInstance.post(`/status-page`, fd, {
|
||||
|
||||
Reference in new issue
Block a user