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

Feature/admin zip upload on reset #335

Merged
merged 11 commits into from
Oct 24, 2023
Merged

Conversation

hahn-kev
Copy link
Collaborator

closes #327

@github-actions
Copy link

github-actions bot commented Oct 18, 2023

UI unit Tests

1 tests  ±0   1 ✔️ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ±0 

Results for commit 5e9402d. ± Comparison against base commit 27ca67b.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 18, 2023

C# Unit Tests

33 tests  +3   33 ✔️ +3   10s ⏱️ -2s
  6 suites ±0     0 💤 ±0 
  1 files   ±0     0 ±0 

Results for commit 5e9402d. ± Comparison against base commit 27ca67b.

♻️ This comment has been updated with latest results.

@myieye
Copy link
Contributor

myieye commented Oct 18, 2023

I tried to upload the zip that I downloaded and it didn't work:
image

Sounds like you picked the right one (reading here and here) and we even zip it explicitly with that type. Seems like tus does something weird here. Anyway, that's why I expanded/introduced the allowed zip types.

@hahn-kev hahn-kev marked this pull request as ready for review October 19, 2023 05:02
@hahn-kev
Copy link
Collaborator Author

Alright I've pushed my error code work and set translations in place as well.

As for the zip mime type. According to a comment on this answer windows will report the mime type of a .zip file as application/x-zip-compressed. The mime type we're getting in the backend comes directly from the browser file API, we pass the mime type as metadata to tus, so it's probably not changing anything there. Can you console log out the file type when it's selected and report back what you see and if you get something else? I just tried and I can't ever get x-zip-compressed doesn't matter the zip file or browser.

My main concern with that is that different OS or something will report the type differently and an admin might be stuck.

@myieye
Copy link
Contributor

myieye commented Oct 19, 2023

@hahn-kev I can't ever get application/zip. I tried Firefox and Chrome and downloading the zip from the API in k8s and locally.

image
image

@hahn-kev
Copy link
Collaborator Author

I get the same thing from powershell, I wonder why it's different in the browser on my machine. Well I guess we can support both and hope there's no extras. @rmunn could you see what a browser on linux reports the mime type for a zip file is?

@hahn-kev hahn-kev requested a review from rmunn October 20, 2023 08:22
@myieye myieye force-pushed the feature/admin-zip-upload-on-reset branch from a9e536d to 9d6e562 Compare October 20, 2023 10:05
@hahn-kev hahn-kev merged commit a6289fc into develop Oct 24, 2023
11 checks passed
@myieye myieye deleted the feature/admin-zip-upload-on-reset branch December 18, 2023 10:34
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.

project reset requires admins to upload a zip of the .hg folder
2 participants