0
フォームの処理にNodeの強力なモジュールを使用しています。完璧に動作します。今は、ファイルのアップロードが開始される前に投稿された非ファイルのフィールド名/値にアクセスする必要があります。フィールド名/値は、ファイルのアップロードが完了した後にのみ使用できます。ファイルのアップロードを開始する前にフィールド名を取得する方法はありますか?Formidable Node module ...ファイルアップロードの進行が始まる前にファイル以外のフィールド名/値を取得する方法
formProcess = new formidable.IncomingForm();
...
formProcess.parse(req, function(error, myFields, myFiles) {
//I get access to the field values here...
//But only after the files are uploaded.
//I need this info before the file uploads start.
}
..
formProcess.on('progress', function(alreadyReceived, expectedToRcv) {
//Fileupload progress info available here...
//I need field names here while processing the upload progress.
//Application specific requirement...
}
これは、http postメソッドの動作やNode Formidableモジュールの実装固有のものですか。
これはこれを助けました... formProcess.on( 'field'、function(name、value){});この "フィールド"イベントは、ファイルアップロードの進行が始まる前に送出されます。 – Sam