Skip to content

refactor(context): modify SaveUploadedFile#4181

Merged
appleboy merged 1 commit into
gin-gonic:masterfrom
nezhafan:refactor-context
Mar 18, 2025
Merged

refactor(context): modify SaveUploadedFile#4181
appleboy merged 1 commit into
gin-gonic:masterfrom
nezhafan:refactor-context

Conversation

@nezhafan
Copy link
Copy Markdown
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
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