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

feat: upload file without formdata #495

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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>' }).

www/public-interface.js Outdated Show resolved Hide resolved
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