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

[ui-storagebrowser] adds extract archive action #3950

Open
wants to merge 3 commits into
base: feat/storage-browser-12
Choose a base branch
from

Conversation

ramprasadagarwal
Copy link
Collaborator

What changes were proposed in this pull request?

  • When the file is compressed in the file browser, user can extract it using this action.

How was this patch tested?

  • Added unit tests

expect(getByRole('button', { name: 'Extract' })).toBeInTheDocument();
});

it('should call handleExtract with the correct data when "Extract" is clicked', async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

with the correct "form data" or perhaps "with path and name"

onClose: () => void;
}

const ExtractAction = ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would name it ExtractionModal or something along those line since extract is a verb and this is a modal based component

className="cuix antd"
okText={t('Extract')}
onCancel={onClose}
onOk={() => handleExtract()}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: onOk={handleExtract}

postOptions: {
qsEncodeData: false,
headers: {
'Content-Type': 'multipart/form-data'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are we using 'multipart/form-data'? We are not sending the actual file here right, just some key values as JSON data?

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

Successfully merging this pull request may close these issues.

2 participants