I am using NAudio to convert my mp3 file to waveform image, for this i am using file uploader
<input type="file" name="file" />
so user can select their mp3 file and can upload the wave image in particular location in server. If i hard code "c:\media\cat\001\music.mp3" it is working properly, how do i can change according the user uploads.
//here filePath should be "c:\media\cat\001\music.mp3"
using(Mp3FileReader reader = new Mp3FileReader(filePath)) {
using(WaveStream pcmStream = WaveFormatConversionStream.CreatePcmStream(reader)) {
WaveFileWriter.CreateWaveFile(outputFile, pcmStream);
}
}
Please give me some solution for this to get the full path of the file? i know through file upload we never get client file full path, so how to read that file, above code will fit to WPF , how to do in MVC?