Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mdkaifansari04
Copy link
Contributor

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

  • Yes, I signed my commits.

Signed-off-by: Md Kaif Ansari <[email protected]>
Copy link

@pranjalg1331 pranjalg1331 left a 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}`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataUri -> dataUrl

Copy link
Member

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';

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?

Copy link
Member

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}`;
Copy link
Member

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';
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants