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

refactor(context): modify SaveUploadedFile #4181

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

NezhaFan
Copy link
Contributor

@NezhaFan NezhaFan commented Mar 12, 2025

Optimization 1: Use filepath.Dir once instead.
Optimization 2: Modify the acquisition of mode, which will be more intuitive.
Question: I think it is unnecessary to use os.Chmod every time here, but I don't have a better way to solve it, because it need add the os.Stat function and what should you do if you encounter different permissions

@appleboy appleboy added this to the v1.11 milestone Mar 18, 2025
@appleboy appleboy merged commit a4baac6 into gin-gonic:master Mar 18, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants