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

Recognize content type by temp filename, fix memory leaks #25

Merged
merged 10 commits into from
Nov 19, 2021

Conversation

smoskalenko
Copy link
Contributor

With this MR:

  • On POST() action, content type of the uploaded file will be recognized by $_FILES['tmp_name']
  • On GET() action , content type of original file will be recognized by original cached filename

In both cases ContentType::byFilenam() will be used which internally call finfo::file method, instead of finfo::buffer (which has a memory leaks)

composer.json Outdated Show resolved Hide resolved
@Magomogo Magomogo merged commit b690fe2 into Magomogo:master Nov 19, 2021
@Magomogo
Copy link
Owner

Thanks!

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.

None yet

2 participants