chore: review fixes
This commit is contained in:
@@ -4,7 +4,6 @@ import BaseBubble from './Base.vue';
|
||||
import AudioChip from 'next/message/chips/Audio.vue';
|
||||
import Icon from 'next/icon/Icon.vue';
|
||||
import { useLoadWithRetry } from 'dashboard/composables/loadWithRetry';
|
||||
import { timeStampAppendedURL } from 'dashboard/helper/URLHelper';
|
||||
import { useMessageContext } from '../provider.js';
|
||||
|
||||
const { attachments } = useMessageContext();
|
||||
@@ -19,7 +18,7 @@ const { isLoaded, hasError, loadWithRetry } = useLoadWithRetry({
|
||||
|
||||
onMounted(() => {
|
||||
if (attachment.value?.dataUrl) {
|
||||
loadWithRetry(timeStampAppendedURL(attachment.value.dataUrl));
|
||||
loadWithRetry(attachment.value.dataUrl);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -27,7 +27,9 @@ export const useLoadWithRetry = (config = {}) => {
|
||||
element.onload = onSuccess;
|
||||
}
|
||||
element.onerror = () => reject(new Error('Failed to load resource'));
|
||||
element.src = url;
|
||||
const cacheBustedUrl = new URL(url);
|
||||
cacheBustedUrl.searchParams.set('t', Date.now());
|
||||
element.src = cacheBustedUrl.toString();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user