Skip to content

Conversation

@h4ck-rOOt
Copy link

@h4ck-rOOt h4ck-rOOt commented Feb 8, 2023

Motivation

We want to support native file uploads without the use of form-data. Therefore it was necessary to supply more information to the "uploadFiles" command and create a new way to upload those raw files.

ToDo

  • Android
  • iOS
  • Tests
  • Documentation

Details

There is a new option 'transmitFileAs' which currently only supports "BINARY", NULL, undefined or any string except "binary". The default behavior is "FORMDATA". There is no need to change existing code.

If you want to use this new feature, you can use http.sendRequest({ method: 'upload', fileName: '<yourfile>', transmitFileAs: 'BINARY', url: '<your url>' }).

silkimen added a commit that referenced this pull request Feb 20, 2023
deenel added a commit to MobisysGmbH/cordova-plugin-advanced-http that referenced this pull request Feb 22, 2024
* feat: upload file without formdata

* fix: handle 'missing' options

* test: implement tests for silkimen#495

* chore: some cleanup

* add fork version, add transmitfileas to readme

* bump version

---------

Co-authored-by: Tobias Becht <[email protected]>
Co-authored-by: Sefa Ilkimen <[email protected]>
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.

2 participants