Skip to content

Commit

Permalink
chore: add back temp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Nelson committed Mar 25, 2024
1 parent 250df23 commit eb8eafa
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:amplify_core/amplify_core.dart';
import 'package:amplify_storage_s3_dart/amplify_storage_s3_dart.dart';
import 'package:amplify_storage_s3_dart/src/storage_s3_service/storage_s3_service.dart';
import 'package:meta/meta.dart';
import 'package:path/path.dart' as p;

/// The io implementation of `downloadFile` API.
@internal
Expand Down Expand Up @@ -39,7 +40,10 @@ S3DownloadFileOperation downloadFile({
preStart: () async {
destinationPath = await _ensureDestinationWritable(localFile);
tempFile = File(
uuid(),
p.join(
await appPathProvider.getTemporaryPath(),
'amplify_storage_s3_temp_${uuid()}',
),
);
sink = tempFile.openWrite(mode: FileMode.append);
},
Expand Down

0 comments on commit eb8eafa

Please sign in to comment.