Wrong file name in file type when uploading
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.9k
- Forks
- 703
- PR merge metrics
- No merged PRs in 30d
Description
Hey,
``` javascript
nga.field('image', 'file').uploadInformation({
'url': imageUrl,
'headers': {'Authorization': token},
'apifilename': 'image'
}),
```
In the request the name property has a wrong value :
```
Content-Disposition: form-data; name="file"; filename="toto.jpg"
```
It should be "image".
The html markup of the input has the correct value:
``` html
```
I can't find the problem, ng-admin seems to correctly pass the filename to ng-file-upload.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the upload using the JavaScript snippet and compare the input's name="image" with the multipart request's name="file". Trace how ng-admin passes apifilename to ng-file-upload, then verify that the request uses image while retaining the uploaded filename.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100