We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
at https://pub.dev/packages/lucifer#file-uploads the documentation says second example:
final app = App(); final form = app.form(); app.post('/upload', (Req req, Res res) async { await form .onField((name, field) { print('${name} ${field}'); }) .onFile((name, file) { print('${name} ${file.filename}'); }) .onError((error) { print('$error'); }) .onEnd(() { res.end(); }) .parse(req); });
or third example:
final app = App(); final form = app.form(); app.post('/upload', (Req req, Res res) async { await form .on('field', (name, field) { print('${name} ${field}'); }) .on('file', (name, file) { print('${name} ${file}'); }) .on('error', (error) { print('$error'); }) .on('end', () { res.end(); }) .parse(req); });
in both cases onFile and on('file' ...) are not triggered.
in .pub-cache/hosted/pub.dartlang.org/lucifer-1.0.7/lib/src/parsers/form_parser.dart line 76 / 78 listener is always null.
The first example doesn't work either
final app = App(); final form = app.form(); app.post('/upload', (Req req, Res res) async { await form.parse(req, (error, fields, files) { if (error) { print('$error'); } print(fields); print(files); }); });
the line if (error) {. should be if (error != null) {
if (error) {
if (error != null) {
The text was updated successfully, but these errors were encountered:
No branches or pull requests
at https://pub.dev/packages/lucifer#file-uploads
the documentation says
second example:
or third example:
in both cases onFile and on('file' ...) are not triggered.
in .pub-cache/hosted/pub.dartlang.org/lucifer-1.0.7/lib/src/parsers/form_parser.dart line 76 / 78 listener is always null.
The first example doesn't work either
the line
if (error) {
. should beif (error != null) {
The text was updated successfully, but these errors were encountered: