Commit Graph

149 Commits

Author SHA1 Message Date
エリス 2cdb0403a8 feat!: remove deprecated whitelist usage (#307) 2021-07-28 01:12:56 +09:00
Tim Brust 88e39df8a5 fix(ios): remove hardcoded X-Requested-With header (#287)
no other platform sets this header and it should be up to the user if it's desired to 'disguise' the HTTP call as an XMLHttpRequest
2020-10-27 15:40:46 +00:00
Christiaan Baartse dcae9269b8 fix(ios): headers are not being sent (#284) 2020-10-27 12:56:35 +00:00
Tim Brust cd15b50172 refactor(eslint): use cordova-eslint /w fix (#275) 2020-09-01 15:08:24 +00:00
Tim Brust 46666ee89c fix!: remove deprecated platforms (#270) 2020-08-31 14:02:08 +00:00
Tim Brust 64bfd154b3 fix(ios): re-implement user agent overwrite (#268)
This closes #263 #258
2020-08-25 23:44:32 +02:00
Trong Tran 6c99dfa8d9 [windows] Fix js error "The parameter is incorrect" (#199)
<!--
Please make sure the checklist boxes are all checked before submitting the PR. The checklist
is intended as a quick reference, for complete details please see our Contributor Guidelines:

http://cordova.apache.org/contribute/contribute_guidelines.html

Thanks!
-->

### Platforms affected
windows

### What does this PR do?
Fix js error "The parameter is incorrect" when download progress is 0 in error handler

### What testing has been done on this change?
Manual testing

### Checklist
- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
- [ ] Added automated test coverage as appropriate for this change.
2018-10-01 22:45:08 +02:00
Simon MacDonald 82100791e3 CB-12809: Google Play Blocker: Unsafe SSL TrustManager Defined
Closes #187
2017-08-31 17:33:27 -04:00
Luca Torella fba018ef65 Removed warning
Just a small change to avoid a warning
2017-07-11 16:20:48 -07:00
Nikita Matrosov e9d93c0a54 CB-10696 iOS: Encode target path with spaces 2017-04-06 16:27:07 +03:00
daserge 5a711e8722 CB-12154 file-transfer progressEvent.total = -1 on iOS
Makes chunkedMode=true uploads to contain Content-Length to make progress computable
2016-12-06 17:06:00 +03:00
daserge 655489905a CB-10974 Cordova file transfer Content-Length header problem
Don't force chunkedMode=true for HTTPS if it was specified as false in the UploadOptions (added a warning about possible OOM for chunkedMode=false+HTTPS case)
2016-11-23 14:33:32 +03:00
Adam Nemitoff 2b6b6d9333 CB-9022 Fix exception thrown by call to remapApi on main thread
When reamapApi was being called for device file it was performing IO on
the WebCore thread and throwing an IllegalState exception.  This seems
to have only been a problem when local URL corresponded to a video file.

Moved calls to remapApi for device URLs within new thread context so
that IO is performed on background thread.

This is the same fix as 3ccf9f8 but for `download` operation

This closes #124
2016-08-23 11:07:50 +03:00
Simon MacDonald 13d5cfe4dc Plugin uses Android Log class and not Cordova LOG class 2016-08-22 16:27:02 -04:00
Vladimir Kotikov 3ccf9f8462 CB-9022 Resolve source URI on background thread
We should call remapUri on background thread otherwise it
throws IllegalStateException when trying to remap  'cdvfile://localhost/content/...' URIs via ContentFilesystem
2016-08-18 16:34:18 +03:00
Ben Marshall 9dc41bd4e9 CB-11316 windows: Added content-type for files
- added Content-Type header for each file in the multipart upload

 This closes #149
2016-08-17 17:24:00 +03:00
daserge 9347606dd3 CB-10974 Cordova file transfer Content-Length header problem
Fixed iOS logic to not to include Content-Length when chunkedMode=true
Fixed Android logic preventing chunkedMode to be enabled for http uploads
Added tests for chunkedMode
Documented chunkedMode not supported on Windows
Documented Uploading of an empty file is not supported for chunkedMode=true and multipart=false for iOS, pended the corresponding test
2016-05-17 12:24:27 +03:00
Raghav Katyal 584754869b CB-10771: Fixing failure when empty string passed as a value for option parameter in upload function 2016-03-28 15:08:58 -07:00
daserge 418e904a98 CB-10636 Add JSHint for plugins 2016-02-29 11:59:58 +03:00
daserge 333dd7ec1a CB-10208 Fix file-transfer multipart form data upload format on Windows 2015-12-17 12:57:25 +03:00
daserge 182b0c5ebe CB-9837 Add data URI support to file-transfer upload on iOS
Adds iOS and Windows implementation; mention in the docs
Adds corresponding tests
Increases spec.35 timeout for Windows Phone 8.1 case as it contains 2 download operations
2015-12-14 16:58:18 +03:00
FF Xu e14b7e5391 CB-9840 Fallback file-transfer upload/download response encoding to latin1 in case not encoded with UTF-8 on iOS 2015-12-04 13:26:33 +03:00
daserge a762f3fe58 CB-8641 (Windows Phone 8.1) Some file-transfer plugin tests occasionally fail in mobilespec
Increases timeout for Windows case for spec.10, spec.21 (abort right away), spec.15 (unknown host)
Documents the latency quirk caused by BackgroundDownloader usage
[Windows] Mark an upload aborted to be cancelled right away as it did not have enough time to be created when abort was called in filetransfer.spec.21 (so that unexpected httpWin fired)
Extended test buffer to avoid unexpectedCallbacks.httpWin on Windows & local test server (filetransfer.spec.21)
2015-12-04 09:57:37 +03:00
daserge 73223a7d45 CB-7006 Empty file is created on file transfer if server response is 304
Adds a corresponding test.
Fixes the Windows proxy to not to delete the existing file in case of a download error (including 304) - a temporary file is deleted instead.
2015-11-30 19:27:25 +03:00
daserge fe81475829 CB-9969 Filetransfer upload error deletes original file
Adds back the iOS check
2015-11-30 11:03:10 +03:00
daserge 6e960b2ffd CB-9969 Filetransfer upload error deletes original file
Reverts iOS changes
2015-11-27 10:53:34 +03:00
daserge c97f544ef8 CB-9969 Filetransfer upload error deletes original file
Adds corresponding test and fixes for iOS and Windows
Also fixes filetransfer.spec.9, which used an incorrect path in the root.getFile call.
2015-11-26 23:07:04 +03:00
daserge 007f98692b CB-9563 Mulptipart form data is used even a header named Content-Type is present
Adds non-multipart implementation for Windows and a corresponding test
Adds a fix for Android for uploadResult.bytesSent = 0 for small files
Fixes parameters of FILE_NOT_FOUND_ERR case in upload operation on Windows - passing source file name instead of duplicated server/destination argument

github: close #117
2015-11-25 19:57:48 +03:00
Jesse MacFadyen 9e93bad83c CB-8863 fix block usage of self 2015-11-19 17:02:35 -08:00
Jeroen Verhoest cdeec1c59f CB-9879 getCookies can cause unhandled NullPointerException
Added extra check for CookieManager instance (null pointer on Crosswalk/Android < 4.4)

github: close #107
2015-11-16 19:01:11 +03:00
daserge 189942284a CB-6928 Wrong behaviour transferring cacheable content
Adds support of 304 handling for iOS, Windows and adds a corresponding test
2015-11-11 09:46:17 +03:00
daserge 5857384b94 CB-51 API: FileTransfer - Support PUT Method
Adds a test for upload via PUT method
Adds support for Windows platform
2015-11-11 09:28:21 +03:00
Vito Rifino ea271933e9 CB-8431 File Transfer tests crash on Android Lolipop
github: close #79
2015-10-17 11:40:44 +03:00
jason-ong f8b0f82dfa CB-9790 Align FileUploadOptions fileName and mimeType default parameter values to the docs on iOS
To match the documentation for FileUpload,
change fileName default value to "image.jpg"
change mimeType default value to "image/jpg"

github: close #98
2015-10-15 22:55:20 +03:00
Ganster41 c0b3122e74 CB-9385 Return FILE_NOT_FOUND_ERR when receiving 404 code on iOS 2015-10-15 19:14:24 +03:00
Joe Bowser a4a448095c CB-9624: There's a difference between what's being passed in and what should actually be sent to the File Transfer plugin 2015-09-08 14:04:04 -07:00
Joe Bowser 8fcdb1aa3d Found issue where : is accepted as a valid header, this is obviously wrong 2015-09-08 11:19:34 -07:00
Snay 2b31723708 CB-9562 Fixed incorrect headers handling on Android 2015-08-26 16:35:09 -07:00
Joe Bowser ad6647120d Fixing headers so they don't accept non-ASCII 2015-08-24 11:15:37 -07:00
biodiv dcc98db15f CB-8816 Add cdvfile:// support on windows
github close #70
2015-08-03 16:32:20 +03:00
Nikhil Khandelwal e8ca110a30 CB-9275 [WP8] Fix build failure on WP8 by using reflection to detect presence of JSON.NET based serialization 2015-07-01 12:50:55 -07:00
Ian Clelland 7591ab84b5 CB-6503: Null pointer check for headers in upload (This closes #27) 2015-06-08 15:09:24 -04:00
Michael Chen 04f088b6c9 CB-6503: Allow payload content-types other than multipart/form-data to be used for upload 2015-06-08 15:09:24 -04:00
Steve Gill 3c5988e522 Merge branch 'fixed-cookies' of https://github.com/dpogue/cordova-plugin-file-transfer 2015-06-02 11:09:13 -07:00
alsorokin ea225af6f2 CB-8951 (wp8) Handle exceptions in download() and upload() again
github close #84
2015-05-27 17:06:59 +03:00
Jesse MacFadyen 907e1cdb13 Check for the existence of Json.net assembly to determin how we deserialize our headers. 2015-05-14 17:21:40 -07:00
Jesse MacFadyen f1e41ac1f5 fix failing test resulting from overlapping async calls 2015-05-11 17:47:08 -07:00
Jesse MacFadyen 65eea291b2 fix merge 2015-05-08 17:23:17 -07:00
Vladimir Kotikov 3effd7f1fe CB-8931 Replace all slashes in windows path 2015-05-07 09:23:48 +03:00
alsorokin e5c25b6bc7 CB-8951 Fixed crash related to headers parsing on wp8 2015-05-05 15:48:15 +03:00