Commit Graph
133 Commits
Author SHA1 Message Date
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 Xuanddaserge 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 Verhoestanddaserge 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 Rifinoanddaserge ea271933e9 CB-8431 File Transfer tests crash on Android Lolipop
github: close #79
2015-10-17 11:40:44 +03:00
jason-onganddaserge 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
Ganster41anddaserge 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
SnayandJoe Bowser 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
biodivandsgrebnov 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 ChenandIan Clelland 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
alsorokinandsgrebnov 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
Dan Polivyandsgrebnov 4f7e1566bd CB-6313 [wp8]: Extra boundary in upload
When performing an upload on Windows Phone, an extra boundary is
included after any parameters, and before the file contents. This causes
some servers (such as express/multiparty on node.js) to fail to handle
the request properly.

This commit removes the extraneous boundary.

Fixes https://issues.apache.org/jira/browse/CB-6313

github close #73
2015-04-25 15:06:48 -07:00
Dan Polivyandsgrebnov 75d55ddaaa CB-8761 [wp8]: Copy cookies from WebBrowser
On other platforms, the cookies from the browser that apply to the
request are automatically included. On WP8, that's not the case.

This commit will copy the cookies from the WebBrowser control, if the
scheme and host of the WebBrowser match that of the HttpWebRequest. For
users who host their web components remotely, and perform
uploads/downloads from the same server using cookie based
authentication, this fix enables that scenario on WP8, and brings it up
to parity with iOS, Android, and others.

Fixes https://issues.apache.org/jira/browse/CB-8761

CB-8761 [wp8]: Cleanup per comments

github close #74
2015-04-25 15:03:23 -07:00
alsorokinandVladimir Kotikov 8e22d5a6b0 CB-8641 Fixed tests to pass on windows and wp8 2015-04-08 13:09:12 +03:00
Vladimir Kotikov 918b2cf8d2 CB-8583 Forces download to overwrite existing target file 2015-04-02 13:43:07 +03:00
Vladimir Kotikov 6ed66a4f29 CB-8589 Fixes upload failure when server's response doesn't contain any data 2015-04-02 13:41:12 +03:00
Steve Gill 0530d90fb0 CB-8683 changed plugin-id to pacakge-name 2015-04-01 19:11:23 -07:00
Jan Visser 569568f8b4 Replace all slashes in windows path
Instead of just the first one
2015-04-01 12:50:37 +02:00
Vladimir Kotikov 21fb03aa9c CB-8721 Fixes incorrect headers and upload params parsing on wp8 2015-03-24 11:46:51 +03:00
Darryl Pogue f5d6cd8e16 Fix NoSuchMethodException looking up cookies. 2015-03-05 11:48:47 -08:00
alsorokinandsgrebnov 3ff8382929 CB-8590 (Windows) Fixed download.onprogress.lengthComputable
github close #67
2015-03-05 12:24:57 +03:00
Vladimir KotikovandJesse MacFadyen 314677c0c3 Fixes typo, introduced in https://github.com/apache/cordova-plugin-file-transfer/commit/bc43b46 2015-02-11 17:46:04 -08:00
Vladimir KotikovandJesse MacFadyen 5ee666ce0b CB-8407 Use File proxy to construct valid FileEntry for download success callback
Due to changes in file plugin (https://github.com/apache/cordova-plugin-file/commit/bcbeae24cd24583b790da95e0e076492eb16cd4f) result of download method should now have filesystemName specified for proper work. This updates download method to construct FileEntry properly, using File plugin proxy.
2015-02-11 17:46:03 -08:00
Vladimir KotikovandJesse MacFadyen 28189e54f3 CB-8407 Removes excess path to native path conversion in download method
This fixes file transfer download tests failures, when target file is specified by ms-appdata:/// uri on Windows.
2015-02-11 17:46:03 -08:00
Vladimir KotikovandJesse MacFadyen 837771c4c6 CB-8095 Fixes JSHint and formatting issues 2015-02-11 17:46:00 -08:00
Vladimir KotikovandJesse MacFadyen e781bceba7 CB-8095 Rewrite upload method to support progress events properly
* Uses backgroundUploader class instead of XHR
* Returns proper response body in case of error
2015-02-11 17:45:59 -08:00
Kelly Campbell 0aae94495f android: Fix error reporting for unknown uri type on sourceUri instead of targetUri 2015-01-31 22:34:33 -05:00