Grails 3.0.10: Cannot upload file with PUT method
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
The line:
``` groovy
def f = request.getFile('attachment')
```
Produce the following error:
```
No signature of method:
org.grails.web.filters.HiddenHttpMethodFilter$HttpMethodRequestWrapper.getFile()
is applicable for argument types: (java.lang.String)
```
Html used:
``` html
...
```
The same issue is mentioned here https://github.com/grails/grails-core/issues/668 by pentagon.
The same form works correctly with the POST method.
Contributor guide
Research direction
Start with the HiddenHttpMethodFilter$HttpMethodRequestWrapper error and compare the supplied uploadForm using PUT with the same form using POST. Review the related issue #668, then reproduce the request and confirm that request.getFile('attachment') works for PUT uploads without changing the existing POST behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100