Skip to content

Commit d10f22b

Browse files
make backward compatible
1 parent e40c8e5 commit d10f22b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

templates/dart/lib/src/input_file.dart.twig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ class InputFile {
66
final String? filename;
77
final String? contentType;
88

9+
@Deprecated('Use `InputFile.fromPath` or `InputFile.fromBytes` instead.')
10+
InputFile({this.path, this.filename, this.contentType, this.bytes}) {
11+
if (path == null && bytes == null) {
12+
throw AppwriteException('One of `path` or `bytes` is required');
13+
}
14+
}
15+
916
InputFile._({this.path, this.filename, this.contentType, this.bytes}) {
1017
if (path == null && bytes == null) {
1118
throw AppwriteException('One of `path` or `bytes` is required');

0 commit comments

Comments
 (0)