@sumaris-net/ngx-components 2.2.3 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/doc/changelog.md +7 -0
  2. package/esm2020/src/app/core/form/form.utils.mjs +1 -2
  3. package/esm2020/src/app/core/menu/menu.component.mjs +14 -7
  4. package/esm2020/src/app/core/table/table.class.mjs +3 -3
  5. package/esm2020/src/app/shared/dates.mjs +2 -2
  6. package/fesm2015/sumaris-net.ngx-components.mjs +14 -9
  7. package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
  8. package/fesm2020/sumaris-net.ngx-components.mjs +14 -9
  9. package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/README.md +5 -6
  12. package/src/app/core/form/form.utils.d.ts +0 -1
  13. package/src/app/core/table/table.class.d.ts +3 -1
  14. package/plugins/clovelced-plugin-audiomanagement/README.md +0 -66
  15. package/plugins/cordova-plugin-camera/README.md +0 -703
  16. package/plugins/cordova-plugin-device/README.md +0 -309
  17. package/plugins/cordova-plugin-file/README.md +0 -848
  18. package/plugins/cordova-plugin-file-transfer/README.md +0 -598
  19. package/plugins/cordova-plugin-file-transfer/doc/de/README.md +0 -311
  20. package/plugins/cordova-plugin-file-transfer/doc/es/README.md +0 -311
  21. package/plugins/cordova-plugin-file-transfer/doc/fr/README.md +0 -270
  22. package/plugins/cordova-plugin-file-transfer/doc/it/README.md +0 -311
  23. package/plugins/cordova-plugin-file-transfer/doc/ja/README.md +0 -311
  24. package/plugins/cordova-plugin-file-transfer/doc/ko/README.md +0 -311
  25. package/plugins/cordova-plugin-file-transfer/doc/pl/README.md +0 -311
  26. package/plugins/cordova-plugin-file-transfer/doc/zh/README.md +0 -311
  27. package/plugins/cordova-plugin-ionic-keyboard/README.md +0 -220
  28. package/plugins/cordova-plugin-ionic-webview/README.md +0 -181
  29. package/plugins/cordova-plugin-media-capture/README.md +0 -626
  30. package/plugins/cordova-plugin-splashscreen/README.md +0 -387
  31. package/plugins/cordova-plugin-statusbar/README.md +0 -341
  32. package/plugins/cordova-plugin-telerik-imagepicker/README.md +0 -155
  33. package/plugins/cordova-plugin-whitelist/README.md +0 -185
  34. package/plugins/cordova-sqlite-storage/README.md +0 -1848
  35. package/plugins/integrator-cordova-plugin-downloader/README.md +0 -49
@@ -1,311 +0,0 @@
1
- <!--
2
- # license: Licensed to the Apache Software Foundation (ASF) under one
3
- # or more contributor license agreements. See the NOTICE file
4
- # distributed with this work for additional information
5
- # regarding copyright ownership. The ASF licenses this file
6
- # to you under the Apache License, Version 2.0 (the
7
- # "License"); you may not use this file except in compliance
8
- # with the License. You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing,
13
- # software distributed under the License is distributed on an
14
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- # KIND, either express or implied. See the License for the
16
- # specific language governing permissions and limitations
17
- # under the License.
18
- -->
19
-
20
- # cordova-plugin-file-transfer
21
-
22
- [![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg)](https://travis-ci.org/apache/cordova-plugin-file-transfer)
23
-
24
- プラグインのマニュアル: <doc/index.md>
25
-
26
- このプラグインは、アップロードし、ファイルをダウンロードすることができます。
27
-
28
- このプラグインでは、グローバル `FileTransfer`、`FileUploadOptions` コンス トラクターを定義します。
29
-
30
- グローバル スコープでは使用できませんまで `deviceready` イベントの後です。
31
-
32
- document.addEventListener("deviceready", onDeviceReady, false);
33
- function onDeviceReady() {
34
- console.log(FileTransfer);
35
- }
36
-
37
-
38
- ## インストール
39
-
40
- cordova plugin add cordova-plugin-file-transfer
41
-
42
-
43
- ## サポートされているプラットフォーム
44
-
45
- * アマゾン火 OS
46
- * アンドロイド
47
- * ブラックベリー 10
48
- * ブラウザー
49
- * Firefox の OS * *
50
- * iOS
51
- * Windows Phone 7 と 8 *
52
- * Windows 8
53
- * Windows
54
-
55
- \ * * `Onprogress`も`abort()`をサポートしていません。*
56
-
57
- \ * * * `Onprogress`をサポートしていません。*
58
-
59
- # 出色
60
-
61
- `出色`オブジェクトは、HTTP マルチパート POST または PUT 要求を使用してファイルをアップロードし、同様にファイルをダウンロードする方法を提供します。
62
-
63
- ## プロパティ
64
-
65
- * **onprogress**: と呼ばれる、 `ProgressEvent` データの新しいチャンクが転送されるたびに。*(機能)*
66
-
67
- ## メソッド
68
-
69
- * **アップロード**: サーバーにファイルを送信します。
70
-
71
- * **ダウンロード**: サーバーからファイルをダウンロードします。
72
-
73
- * **中止**: 進行中の転送を中止します。
74
-
75
- ## upload
76
-
77
- **パラメーター**:
78
-
79
- * **fileURL**: デバイス上のファイルを表すファイルシステム URL。 下位互換性は、このことも、デバイス上のファイルの完全パスであります。 (参照してください [後方互換性メモ] の下)
80
-
81
- * **サーバー**: によって符号化されるように、ファイルを受信するサーバーの URL`encodeURI()`.
82
-
83
- * **successCallback**: `FileUploadResult` オブジェクトが渡されるコールバック。*(機能)*
84
-
85
- * **errorCallback**: エラー `FileUploadResult` を取得するが発生した場合に実行されるコールバック。`FileTransferError` オブジェクトを使って呼び出されます。*(機能)*
86
-
87
- * **オプション**: 省略可能なパラメーター *(オブジェクト)*。有効なキー:
88
-
89
- * **fileKey**: フォーム要素の名前。既定値は `file` です。(,)
90
- * **ファイル名**: ファイル名、サーバー上のファイルを保存するときに使用します。既定値は `image.jpg` です。(,)
91
- * **httpMethod**: - `を置く` または `POST` のいずれかを使用する HTTP メソッド。デフォルト `のポスト` です。(,)
92
- * **mimeType**: アップロードするデータの mime タイプ。`イメージ/jpeg` のデフォルトです。(,)
93
- * **params**: HTTP リクエストに渡すために任意のキー/値ペアのセット。(オブジェクト)
94
- * **chunkedMode**: チャンク ストリーミング モードでデータをアップロードするかどうか。デフォルトは `true` です。(ブール値)
95
- * **headers**: ヘッダー名/ヘッダー値のマップ。 配列を使用して、1 つ以上の値を指定します。 IOS、FireOS、アンドロイドではという名前のコンテンツ タイプ ヘッダーが存在する場合、マルチパート フォーム データは使用されません。 (Object)
96
- * **httpMethod**: 例えばを使用する HTTP メソッドを POST または PUT です。 デフォルト`のポスト`です。(DOMString)
97
-
98
- * **trustAllHosts**: 省略可能なパラメーターは、デフォルト `false` 。 場合設定 `true` 、セキュリティ証明書をすべて受け付けます。 これは Android の自己署名入りセキュリティ証明書を拒否するので便利です。 運用環境で使用しないでください。 Android と iOS でサポートされています。 *(ブール値)*
99
-
100
- ### 例
101
-
102
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
103
- // for example, cdvfile://localhost/persistent/path/to/file.txt
104
-
105
- var win = function (r) {
106
- console.log("Code = " + r.responseCode);
107
- console.log("Response = " + r.response);
108
- console.log("Sent = " + r.bytesSent);
109
- }
110
-
111
- var fail = function (error) {
112
- alert("An error has occurred: Code = " + error.code);
113
- console.log("upload error source " + error.source);
114
- console.log("upload error target " + error.target);
115
- }
116
-
117
- var options = new FileUploadOptions();
118
- options.fileKey = "file";
119
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
120
- options.mimeType = "text/plain";
121
-
122
- var params = {};
123
- params.value1 = "test";
124
- params.value2 = "param";
125
-
126
- options.params = params;
127
-
128
- var ft = new FileTransfer();
129
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
130
-
131
-
132
- ### サンプルのアップロード ヘッダーと進行状況のイベント (Android と iOS のみ)
133
-
134
- function win(r) {
135
- console.log("Code = " + r.responseCode);
136
- console.log("Response = " + r.response);
137
- console.log("Sent = " + r.bytesSent);
138
- }
139
-
140
- function fail(error) {
141
- alert("An error has occurred: Code = " + error.code);
142
- console.log("upload error source " + error.source);
143
- console.log("upload error target " + error.target);
144
- }
145
-
146
- var uri = encodeURI("http://some.server.com/upload.php");
147
-
148
- var options = new FileUploadOptions();
149
- options.fileKey="file";
150
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
151
- options.mimeType="text/plain";
152
-
153
- var headers={'headerParam':'headerValue'};
154
-
155
- options.headers = headers;
156
-
157
- var ft = new FileTransfer();
158
- ft.onprogress = function(progressEvent) {
159
- if (progressEvent.lengthComputable) {
160
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
161
- } else {
162
- loadingStatus.increment();
163
- }
164
- };
165
- ft.upload(fileURL, uri, win, fail, options);
166
-
167
-
168
- ## FileUploadResult
169
-
170
- `FileUploadResult` オブジェクトは `FileTransfer` オブジェクト `upload()` メソッドの成功時のコールバックに渡されます。
171
-
172
- ### プロパティ
173
-
174
- * **bytesSent**: アップロードの一部としてサーバーに送信されたバイト数。(ロング)
175
-
176
- * **記述**: サーバーによって返される HTTP 応答コード。(ロング)
177
-
178
- * **応答**: サーバーによって返される HTTP 応答。(,)
179
-
180
- * **ヘッダー**: HTTP 応答ヘッダー サーバーによって。(オブジェクト)
181
-
182
- * 現在 iOS のみでサポートされます。
183
-
184
- ### iOS の癖
185
-
186
- * サポートしていない `responseCode` または`bytesSent`.
187
-
188
- ## download
189
-
190
- **パラメーター**:
191
-
192
- * **ソース**: によって符号化されるように、ファイルをダウンロードするサーバーの URL`encodeURI()`.
193
-
194
- * **ターゲット**: デバイス上のファイルを表すファイルシステム url。 下位互換性は、このことも、デバイス上のファイルの完全パスであります。 (参照してください [後方互換性メモ] の下)
195
-
196
- * **successCallback**: 渡されたコールバックを `FileEntry` オブジェクト。*(機能)*
197
-
198
- * **errorCallback**: `FileEntry` を取得するときにエラーが発生した場合に実行されるコールバック。`FileTransferError` オブジェクトを使って呼び出されます。*(機能)*
199
-
200
- * **trustAllHosts**: 省略可能なパラメーターは、デフォルト `false` 。 場合設定 `true` 、セキュリティ証明書をすべて受け付けます。 Android は、自己署名入りセキュリティ証明書を拒否しますので便利です。 運用環境で使用しないでください。 Android と iOS でサポートされています。 *(ブール値)*
201
-
202
- * **オプション**: 省略可能なパラメーターは、現在サポートするヘッダーのみ (認証 (基本認証) など)。
203
-
204
- ### 例
205
-
206
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
207
- // for example, cdvfile://localhost/persistent/path/to/downloads/
208
-
209
- var fileTransfer = new FileTransfer();
210
- var uri = encodeURI("http://some.server.com/download.php");
211
-
212
- fileTransfer.download(
213
- uri,
214
- fileURL,
215
- function(entry) {
216
- console.log("download complete: " + entry.toURL());
217
- },
218
- function(error) {
219
- console.log("download error source " + error.source);
220
- console.log("download error target " + error.target);
221
- console.log("upload error code" + error.code);
222
- },
223
- false,
224
- {
225
- headers: {
226
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
227
- }
228
- }
229
- );
230
-
231
-
232
- ### WP8 癖
233
-
234
- * ダウンロード要求するネイティブ実装によってキャッシュに格納されています。キャッシュされないように、渡す`以来変更された if`ヘッダー メソッドをダウンロードします。
235
-
236
- ## abort
237
-
238
- 進行中の転送を中止します。Onerror コールバックが FileTransferError.ABORT_ERR のエラー コードを持っている FileTransferError オブジェクトに渡されます。
239
-
240
- ### 例
241
-
242
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
243
- // for example, cdvfile://localhost/persistent/path/to/file.txt
244
-
245
- var win = function(r) {
246
- console.log("Should not be called.");
247
- }
248
-
249
- var fail = function(error) {
250
- // error.code == FileTransferError.ABORT_ERR
251
- alert("An error has occurred: Code = " + error.code);
252
- console.log("upload error source " + error.source);
253
- console.log("upload error target " + error.target);
254
- }
255
-
256
- var options = new FileUploadOptions();
257
- options.fileKey="file";
258
- options.fileName="myphoto.jpg";
259
- options.mimeType="image/jpeg";
260
-
261
- var ft = new FileTransfer();
262
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
263
- ft.abort();
264
-
265
-
266
- ## FileTransferError
267
-
268
- `FileTransferError` オブジェクトは、エラーが発生したときにエラー コールバックに渡されます。
269
-
270
- ### プロパティ
271
-
272
- * **コード**: 次のいずれかの定義済みのエラー コード。(数)
273
-
274
- * **ソース**: ソースの URL。(文字列)
275
-
276
- * **ターゲット**: 先の URL。(文字列)
277
-
278
- * **http_status**: HTTP ステータス コード。この属性は、HTTP 接続から応答コードを受信したときにのみ使用できます。(数)
279
-
280
- * **body**応答本体。この属性は、HTTP 接続から応答を受信したときにのみ使用できます。(文字列)
281
-
282
- * **exception**: どちらか e.getMessage または e.toString (文字列)
283
-
284
- ### 定数
285
-
286
- * 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
287
- * 2 = `FileTransferError.INVALID_URL_ERR`
288
- * 3 = `FileTransferError.CONNECTION_ERR`
289
- * 4 = `FileTransferError.ABORT_ERR`
290
- * 5 = `FileTransferError.NOT_MODIFIED_ERR`
291
-
292
- ## 後方互換性をノートします。
293
-
294
- このプラグインの以前のバージョンまたはダウンロードのターゲットとして、アップロードのソースとしてのみデバイス絶対ファイル パスを受け入れるでしょう。これらのパスの形式は、通常
295
-
296
- /var/mobile/Applications/<application UUID>/Documents/path/to/file (iOS)
297
- /storage/emulated/0/path/to/file (Android)
298
-
299
-
300
- 下位互換性、これらのパスを使用しても、アプリケーションは、永続的なストレージでこのようなパスを記録している場合、し彼らが引き続き使用されます。
301
-
302
- これらのパスの `FileEntry` やファイル プラグインによって返される `DirectoryEntry` オブジェクトの `fullPath` プロパティで公開されていなかった。 新しいプラグインのバージョン、ファイル、ただし、もはや java スクリプトの設定をこれらのパスを公開します。
303
-
304
- 新しいにアップグレードする場合 (1.0.0 以降) ファイルのバージョン以前を使用している `entry.fullPath` `download()` または `upload()` への引数として、ファイルシステムの Url を代わりに使用するコードを変更する必要があります。
305
-
306
- `FileEntry.toURL()` と `DirectoryEntry.toURL()` ファイルシステムの URL を返すフォーム
307
-
308
- cdvfile://localhost/persistent/path/to/file
309
-
310
-
311
- `download()`、`upload()` メソッドの絶対ファイル パスの代わりに使用できます。
@@ -1,311 +0,0 @@
1
- <!--
2
- # license: Licensed to the Apache Software Foundation (ASF) under one
3
- # or more contributor license agreements. See the NOTICE file
4
- # distributed with this work for additional information
5
- # regarding copyright ownership. The ASF licenses this file
6
- # to you under the Apache License, Version 2.0 (the
7
- # "License"); you may not use this file except in compliance
8
- # with the License. You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing,
13
- # software distributed under the License is distributed on an
14
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- # KIND, either express or implied. See the License for the
16
- # specific language governing permissions and limitations
17
- # under the License.
18
- -->
19
-
20
- # cordova-plugin-file-transfer
21
-
22
- [![Build Status](https://travis-ci.org/apache/cordova-plugin-file-transfer.svg)](https://travis-ci.org/apache/cordova-plugin-file-transfer)
23
-
24
- 플러그인 문서: <doc/index.md>
25
-
26
- 이 플러그인을 사용 하면 업로드 및 다운로드 파일 수 있습니다.
27
-
28
- 이 플러그인 글로벌 `FileTransfer`, `FileUploadOptions` 생성자를 정의합니다.
29
-
30
- 전역 범위에서 그들은 제공 되지 않습니다 때까지 `deviceready` 이벤트 후.
31
-
32
- document.addEventListener("deviceready", onDeviceReady, false);
33
- function onDeviceReady() {
34
- console.log(FileTransfer);
35
- }
36
-
37
-
38
- ## 설치
39
-
40
- cordova plugin add cordova-plugin-file-transfer
41
-
42
-
43
- ## 지원 되는 플랫폼
44
-
45
- * 아마존 화재 운영 체제
46
- * 안 드 로이드
47
- * 블랙베리 10
48
- * 브라우저
49
- * 파이어 폭스 OS * *
50
- * iOS
51
- * Windows Phone 7과 8 *
52
- * 윈도우 8
53
- * 윈도우
54
-
55
- \** `Onprogress` 도 `abort()` 를 지원 하지 않습니다*
56
-
57
- \*** `Onprogress` 를 지원 하지 않습니다*
58
-
59
- # FileTransfer
60
-
61
- `FileTransfer` 개체는 HTTP 다중 파트 POST 또는 PUT 요청을 사용 하 여 파일을 업로드 하 고 또한 파일을 다운로드 하는 방법을 제공 합니다.
62
-
63
- ## 속성
64
-
65
- * **onprogress**:로 불리는 `ProgressEvent` 새로운 양의 데이터를 전송 하는 때마다. *(기능)*
66
-
67
- ## 메서드
68
-
69
- * **업로드**: 파일을 서버에 보냅니다.
70
-
71
- * **다운로드**: 서버에서 파일을 다운로드 합니다.
72
-
73
- * **중단**: 진행 중인 전송 중단.
74
-
75
- ## 업로드
76
-
77
- **매개 변수**:
78
-
79
- * **fileURL**: 장치에 파일을 나타내는 파일 시스템 URL. 에 대 한 이전 버전과 호환성을이 수도 장치에 있는 파일의 전체 경로 수. (참조 [거꾸로 호환성 노트] 아래)
80
-
81
- * **서버**: 인코딩 파일 수신 서버의 URL`encodeURI()`.
82
-
83
- * **successCallback**: `FileUploadResult` 개체를 전달 하는 콜백. *(기능)*
84
-
85
- * **errorCallback**: `FileUploadResult` 검색에 오류가 발생 하면 실행 되는 콜백. `FileTransferError` 개체와 함께 호출 됩니다. *(기능)*
86
-
87
- * **옵션**: 선택적 매개 변수 *(개체)*. 유효한 키:
88
-
89
- * **fileKey**: form 요소의 이름. 기본값은 `file` . (DOMString)
90
- * **파일 이름**: 파일 이름을 서버에 파일을 저장할 때 사용 합니다. 기본값은 `image.jpg` . (DOMString)
91
- * **httpMethod**: `넣어` 또는 `게시물`-사용 하도록 HTTP 메서드. `게시물` 기본값입니다. (DOMString)
92
- * **mimeType**: 업로드 데이터의 mime 형식을. `이미지/jpeg`의 기본값입니다. (DOMString)
93
- * **params**: HTTP 요청에 전달할 선택적 키/값 쌍의 집합. (개체)
94
- * **chunkedMode**: 청크 스트리밍 모드에서 데이터 업로드를 합니다. 기본값은 `true`입니다. (부울)
95
- * **headers**: 헤더 이름 및 헤더 값의 지도. 배열을 사용 하 여 하나 이상의 값을 지정. IOS, FireOS, 안 드 로이드에 있으면 라는 콘텐츠 형식 헤더, 다중 양식 데이터는 사용할 수 없습니다. (Object)
96
- * **httpMethod**: HTTP 메서드 예를 사용 하 여 게시 하거나 넣어. `게시물`기본값입니다. (DOMString)
97
-
98
- * **trustAllHosts**: 선택적 매개 변수는 기본적으로 `false` . 만약 설정 `true` , 그것은 모든 보안 인증서를 허용 합니다. 이 안 드 로이드 자체 서명 된 보안 인증서를 거부 하기 때문에 유용 합니다. 프로덕션 환경에서 사용 권장 되지 않습니다. 안 드 로이드와 iOS에서 지원. *(부울)*
99
-
100
- ### 예를 들어
101
-
102
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
103
- // for example, cdvfile://localhost/persistent/path/to/file.txt
104
-
105
- var win = function (r) {
106
- console.log("Code = " + r.responseCode);
107
- console.log("Response = " + r.response);
108
- console.log("Sent = " + r.bytesSent);
109
- }
110
-
111
- var fail = function (error) {
112
- alert("An error has occurred: Code = " + error.code);
113
- console.log("upload error source " + error.source);
114
- console.log("upload error target " + error.target);
115
- }
116
-
117
- var options = new FileUploadOptions();
118
- options.fileKey = "file";
119
- options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
120
- options.mimeType = "text/plain";
121
-
122
- var params = {};
123
- params.value1 = "test";
124
- params.value2 = "param";
125
-
126
- options.params = params;
127
-
128
- var ft = new FileTransfer();
129
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
130
-
131
-
132
- ### 예를 들어 헤더 업로드 및 진행 이벤트 (안 드 로이드와 iOS만)
133
-
134
- function win(r) {
135
- console.log("Code = " + r.responseCode);
136
- console.log("Response = " + r.response);
137
- console.log("Sent = " + r.bytesSent);
138
- }
139
-
140
- function fail(error) {
141
- alert("An error has occurred: Code = " + error.code);
142
- console.log("upload error source " + error.source);
143
- console.log("upload error target " + error.target);
144
- }
145
-
146
- var uri = encodeURI("http://some.server.com/upload.php");
147
-
148
- var options = new FileUploadOptions();
149
- options.fileKey="file";
150
- options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1);
151
- options.mimeType="text/plain";
152
-
153
- var headers={'headerParam':'headerValue'};
154
-
155
- options.headers = headers;
156
-
157
- var ft = new FileTransfer();
158
- ft.onprogress = function(progressEvent) {
159
- if (progressEvent.lengthComputable) {
160
- loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);
161
- } else {
162
- loadingStatus.increment();
163
- }
164
- };
165
- ft.upload(fileURL, uri, win, fail, options);
166
-
167
-
168
- ## FileUploadResult
169
-
170
- `FileUploadResult` 개체 `FileTransfer` 개체의 `원래` 방법의 성공 콜백에 전달 됩니다.
171
-
172
- ### 속성
173
-
174
- * **bytesSent**: 업로드의 일부로 서버에 보낸 바이트 수. (긴)
175
-
176
- * **responseCode**: 서버에서 반환 된 HTTP 응답 코드. (긴)
177
-
178
- * **response**: 서버에서 반환 되는 HTTP 응답. (DOMString)
179
-
180
- * **headers**: 서버에서 HTTP 응답 헤더. (개체)
181
-
182
- * 현재 ios만 지원 합니다.
183
-
184
- ### iOS 단점
185
-
186
- * 지원 하지 않는 `responseCode` 또는`bytesSent`.
187
-
188
- ## download
189
-
190
- **매개 변수**:
191
-
192
- * **source**: URL로 인코딩된 파일, 다운로드 서버`encodeURI()`.
193
-
194
- * **target**: 장치에 파일을 나타내는 파일 시스템 url. 에 대 한 이전 버전과 호환성을이 수도 장치에 있는 파일의 전체 경로 수. (참조 [거꾸로 호환성 노트] 아래)
195
-
196
- * **successCallback**: 콜백 전달 되는 `FileEntry` 개체. *(기능)*
197
-
198
- * **errorCallback**: `FileEntry`를 검색할 때 오류가 발생 하면 실행 되는 콜백. `FileTransferError` 개체와 함께 호출 됩니다. *(기능)*
199
-
200
- * **trustAllHosts**: 선택적 매개 변수는 기본적으로 `false` . 만약 설정 `true` , 그것은 모든 보안 인증서를 허용 합니다. 안 드 로이드 자체 서명 된 보안 인증서를 거부 하기 때문에 유용 합니다. 프로덕션 환경에서 사용 권장 되지 않습니다. 안 드 로이드와 iOS에서 지원. *(부울)*
201
-
202
- * **options**: 선택적 매개 변수를 현재 지 원하는 머리글만 (예: 인증 (기본 인증), 등).
203
-
204
- ### 예를 들어
205
-
206
- // !! Assumes variable fileURL contains a valid URL to a path on the device,
207
- // for example, cdvfile://localhost/persistent/path/to/downloads/
208
-
209
- var fileTransfer = new FileTransfer();
210
- var uri = encodeURI("http://some.server.com/download.php");
211
-
212
- fileTransfer.download(
213
- uri,
214
- fileURL,
215
- function(entry) {
216
- console.log("download complete: " + entry.toURL());
217
- },
218
- function(error) {
219
- console.log("download error source " + error.source);
220
- console.log("download error target " + error.target);
221
- console.log("upload error code" + error.code);
222
- },
223
- false,
224
- {
225
- headers: {
226
- "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
227
- }
228
- }
229
- );
230
-
231
-
232
- ### WP8 특수
233
-
234
- * 다운로드 요청 기본 구현에 의해 캐시 되 고. 캐싱을 방지 하려면 전달 `if-수정-이후` 헤더를 다운로드 하는 방법.
235
-
236
- ## abort
237
-
238
- 진행 중인 전송을 중단합니다. onerror 콜백 FileTransferError.ABORT_ERR의 오류 코드는 FileTransferError 개체를 전달 합니다.
239
-
240
- ### 예를 들어
241
-
242
- // !! Assumes variable fileURL contains a valid URL to a text file on the device,
243
- // for example, cdvfile://localhost/persistent/path/to/file.txt
244
-
245
- var win = function(r) {
246
- console.log("Should not be called.");
247
- }
248
-
249
- var fail = function(error) {
250
- // error.code == FileTransferError.ABORT_ERR
251
- alert("An error has occurred: Code = " + error.code);
252
- console.log("upload error source " + error.source);
253
- console.log("upload error target " + error.target);
254
- }
255
-
256
- var options = new FileUploadOptions();
257
- options.fileKey="file";
258
- options.fileName="myphoto.jpg";
259
- options.mimeType="image/jpeg";
260
-
261
- var ft = new FileTransfer();
262
- ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options);
263
- ft.abort();
264
-
265
-
266
- ## FileTransferError
267
-
268
- `FileTransferError` 개체 오류가 발생 하면 오류 콜백에 전달 됩니다.
269
-
270
- ### 속성
271
-
272
- * **code**: 미리 정의 된 오류 코드 중 하나가 아래에 나열 된. (수)
273
-
274
- * **source**: 소스 URL. (문자열)
275
-
276
- * **target**: 대상 URL. (문자열)
277
-
278
- * **http_status**: HTTP 상태 코드. 이 특성은 응답 코드를 HTTP 연결에서 수신에 사용할 수 있습니다. (수)
279
-
280
- * **body** 응답 본문입니다. 이 특성은 HTTP 연결에서 응답을 받을 때에 사용할 수 있습니다. (문자열)
281
-
282
- * **exception**: 어느 e.getMessage 또는 e.toString (문자열)
283
-
284
- ### 상수
285
-
286
- * 1 = `FileTransferError.FILE_NOT_FOUND_ERR`
287
- * 2 = `FileTransferError.INVALID_URL_ERR`
288
- * 3 = `FileTransferError.CONNECTION_ERR`
289
- * 4 = `FileTransferError.ABORT_ERR`
290
- * 5 = `FileTransferError.NOT_MODIFIED_ERR`
291
-
292
- ## 이전 버전과 호환성 노트
293
-
294
- 이 플러그인의 이전 버전만 업로드에 대 한 소스 또는 다운로드에 대 한 대상 장치 절대 파일 경로 받아들일 것 이다. 이러한 경로 일반적으로 폼의 것
295
-
296
- /var/mobile/Applications/<application UUID>/Documents/path/to/file (iOS)
297
- /storage/emulated/0/path/to/file (Android)
298
-
299
-
300
- 대 한 뒤 호환성, 이러한 경로 여전히 허용, 그리고 응용 프로그램이 영구 저장소에서 이와 같은 경로 기록 했다, 그때 그들은 계속할 수 있다면 사용할 수.
301
-
302
- 이러한 경로 `FileEntry` 및 파일 플러그인에 의해 반환 된 `DirectoryEntry` 개체의 `fullPath` 속성에 노출 되었던. 그러나 파일 플러그인의,, 더 이상 새로운 버전 자바 스크립트이 경로 노출.
303
-
304
- 새로 업그레이드 하는 경우 (1.0.0 이상) 버전의 파일, 및 이전 사용 하 고 `entry.fullPath` `download()` 또는 `upload()` 인수로 다음 대신 파일 시스템 Url을 사용 하 여 코드를 변경 해야 합니다.
305
-
306
- 폼의 파일 URL을 반환 하는 `FileEntry.toURL()` 및 `DirectoryEntry.toURL()`
307
-
308
- cdvfile://localhost/persistent/path/to/file
309
-
310
-
311
- 어떤 `download()` 및 `upload()` 방법에서 절대 파일 경로 대신 사용할 수 있습니다.