-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect download of design from client #844
base: master
Are you sure you want to change the base?
Incorrect download of design from client #844
Conversation
Signed-off-by: Md Kaif Ansari <[email protected]>
Signed-off-by: Md Kaif Ansari <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdkaifansari04 I assume that you have tested your changes with my pr with the updated handler?
https://github.com/layer5io/meshery-cloud/pull/3060
@@ -47,6 +47,20 @@ export const downloadFilter = (id: string, name: string): void => { | |||
linkElement.remove(); | |||
}; | |||
|
|||
export const downloadPattern = (id: string, name: string, type: string): void => { | |||
const pattern = type == 'design' ? 'patterns' : 'filters'; | |||
const dataUri = `${process.env.API_ENDPOINT_PREFIX}/api/content/${pattern}/download/${id}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dataUri -> dataUrl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdkaifansari04 how you are accessing env variable here directly in sistent?
const dataUri = `${process.env.API_ENDPOINT_PREFIX}/api/content/${pattern}/download/${id}`; | ||
|
||
// Add the .wasm extension to the filename | ||
const fileNameWithExtension = name + '.wasm'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we using .wasm extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly? Document well things while adding new things what and why's?
@@ -47,6 +47,20 @@ export const downloadFilter = (id: string, name: string): void => { | |||
linkElement.remove(); | |||
}; | |||
|
|||
export const downloadPattern = (id: string, name: string, type: string): void => { | |||
const pattern = type == 'design' ? 'patterns' : 'filters'; | |||
const dataUri = `${process.env.API_ENDPOINT_PREFIX}/api/content/${pattern}/download/${id}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdkaifansari04 how you are accessing env variable here directly in sistent?
const dataUri = `${process.env.API_ENDPOINT_PREFIX}/api/content/${pattern}/download/${id}`; | ||
|
||
// Add the .wasm extension to the filename | ||
const fileNameWithExtension = name + '.wasm'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly? Document well things while adding new things what and why's?
Notes for Reviewers
This PR fixed the download of design, before it was downloded from client-side but now the design is been downloaded form server directly.
This PR fixes #
Signed commits