@vlad, yes it's essentially an architecture limitation i.e. lack of a large RAM buffer, and to a lesser extent the use of SPI to transfer the data from the WiFi module. I have just tested the SD card write speed on the Duet WiFi on my bench using M122 P104, and I get speeds of about 1.6Mbytes/sec all the way up to 200Mbyte files. This is with a Kingston Memory 8Gb Class 4 card. I don't think we will do much better that that using the current 8kb write buffer. The problem is, once the card sees the end of the 8kb block write, it may start to do internal wear levelling operations, and those take time.
I am also minded to add another M105 subfunction that tests the speed of uploading a file but discards the data instead of writing it to file. This would help users who are getting slower than expected uploads to determine whether the SD card or the WiFi network is the bottleneck.
We recognise that users want faster upload speeds, and we have addressed that in Duet 3. However, by better overlapping transfers from the WiFi or Ethernet module with transfers to the SD card, I am hopeful that in as future Duet 2 firmware release we can achieve more than 1Mbyte/sec consistently, assuming a good WiFi connection.