Fix redirect on CSV upload
This commit is contained in:
parent
1097004245
commit
322be2fe40
2 changed files with 6 additions and 4 deletions
|
|
@ -275,7 +275,9 @@ const uploadFile = async () => {
|
|||
|
||||
const data = await response.json();
|
||||
uploadSuccess.value = true;
|
||||
emit("doSuccess", data);
|
||||
// This is a hack, I should really fix it later
|
||||
const path = "/_" + data;
|
||||
emit("doSuccess", path);
|
||||
|
||||
resetUpload();
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ function onError(err: Error) {
|
|||
function onFileSelected(file: File) {
|
||||
console.log("file selected", file);
|
||||
}
|
||||
function onUploadSuccess(data: any) {
|
||||
console.log("upload success", data);
|
||||
router.push("/_" + data.uri);
|
||||
function onUploadSuccess(path: string) {
|
||||
console.log("custom CSV upload success", path);
|
||||
router.push(path);
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue