Closed JatinChimote closed 2 years ago
Let me take a look onto this one, you want to add additional form data if i see this correctly and yes it seems currently not possible.
Should be not that hard if i see this correctly :) Maybe today after work or tomorrow but this week. You can open a pull request on this if you want, just let me know.
and update the options interface.
It should be now be possible if you add additionaldata to formData configuration like here.
Version 5.1.1 (still angular 13)
private uploadOptions: NgxFileUploadOptions = {
url: "http://localhost:3000/upload/gallery",
formData: {
enabled: true,
name: "picture",
additionalData: {
'token': 'foobar',
'key': 'second',
'key2': 'third'
}
},
};
Awesome! Thank you so much for your quick changes and response!
Thx alot just let me know if this is not working for you, i tested this only with unit tests :( need to add playwright finally for better coverage so i do not need to watch server logs anymore.
Is your feature request related to a problem? Please describe.
How to send custom key value pairs along with file data. The current implementation considers a field 'metadata' in the UploadOption. I want to upload to S3 using a presigned url and I cannot send some custom keys like "policy", "signature" as there's simply no way to send direct formData fields. or Perhaps I am missing something.
Describe the solution you'd like there should be an option to pass any key value pair to the API that takes care of the uploads, not sure what metadata is the only field.
Describe alternatives you've considered Tried passing data directly but it gets stripped off in the request.
Additional context So I can : I want to :