Allow user specify file in mg_http_upload

This commit is contained in:
Sergey Lyubka committed 2024-02-04 08:56:32 +00:00
1 parent fa5aa308bc
commit e0668bc1c0
9 files changed
+80 -62

No files matched your search

@@ -17,7 +17,7 @@ var sendFileData = function(name, data, chunkSize) {
var sendChunk = function(offset) {
var chunk = data.subarray(offset, offset + chunkSize) || '';
var opts = {method: 'POST', body: chunk};
var url = '/upload?offset=' + offset + '&name=' + encodeURIComponent(name);
var url = '/upload?offset=' + offset + '&file=' + encodeURIComponent(name);
var ok;
setStatus(
'Uploading ' + name + ', bytes ' + offset + '..' +