Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
onikiri2007 committed Jul 31, 2019
1 parent 8c5d98d commit 5a8cf88
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 40 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@

build/

node_modules/
node_modules/

pubspec.lock
Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ public Result doWork() {
}
}


String responseHeaders = gson.toJson(outputHeaders);

Log.d(TAG, "Response: " + responseString);
Log.d(TAG, "Response header: " + responseHeaders);


if (!response.isSuccessful()) {
if (showNotification) {
updateNotification(context, tag, UploadStatus.FAILED, 0, null);
Expand All @@ -221,15 +228,19 @@ public Result doWork() {
createOutputErrorData(
UploadStatus.FAILED, statusCode, "upload_error", responseString, null));
}


Data outputData =
new Data.Builder()
.putString(EXTRA_ID, getId().toString())
.putInt(EXTRA_STATUS, UploadStatus.COMPLETE)
.putInt(EXTRA_STATUS_CODE, statusCode)
.putString(EXTRA_RESPONSE, responseString)
.putString(EXTRA_HEADERS, gson.toJson(outputHeaders))
.putString(EXTRA_HEADERS, responseHeaders)
.build();



if (showNotification) {
updateNotification(context, tag, UploadStatus.COMPLETE, 0, null);
}
Expand Down
34 changes: 0 additions & 34 deletions example/ios/Podfile.lock

This file was deleted.

2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class _UploadScreenState extends State<UploadScreen> {
files: [
FileItem(
filename: filename,
savedDir: "", //savedDir,
savedDir: savedDir,
fieldname: "file",
)
],
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ packages:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.0+3"
version: "0.6.1"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -87,7 +87,7 @@ packages:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
pedantic:
dependency: transitive
description:
Expand Down Expand Up @@ -165,4 +165,4 @@ packages:
version: "2.0.8"
sdks:
dart: ">=2.2.2 <3.0.0"
flutter: ">=0.1.4 <2.0.0"
flutter: ">=1.5.0 <2.0.0"

0 comments on commit 5a8cf88

Please sign in to comment.