Skip to content

Commit

Permalink
fixed IOSink issue in file uploader, replaced it with Uint8List
Browse files Browse the repository at this point in the history
  • Loading branch information
itzmeanjan committed Sep 20, 2019
1 parent 38d9cd8 commit a7df401
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Binary file modified bin/main.dart.aot
Binary file not shown.
Binary file modified bin/main.dart.aot.dill
Binary file not shown.
11 changes: 6 additions & 5 deletions lib/streamZ.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'dart:isolate';
import 'package:path/path.dart' as path;
import 'dart:io';
import 'dart:math' show Random;
import 'dart:typed_data' show Uint8List;

import 'package:streamZ/movies.dart';
import 'package:streamZ/playList.dart';
Expand Down Expand Up @@ -194,11 +195,11 @@ _handlePUTRequest(HttpRequest httpRequest) {
.replaceFirst('filename=', '')
.trimLeft()
.replaceAll('"', '');
httpRequest
.pipe(File(path.join(Platform.environment['HOME'], 'Videos', fileName))
.openWrite(
mode: FileMode.write,
))
File(path.join(Platform.environment['HOME'], 'Videos', fileName))
.openWrite(
mode: FileMode.write,
)
.addStream(httpRequest)
.then(
(val) async {
httpRequest.response
Expand Down

0 comments on commit a7df401

Please sign in to comment.