File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
examples/MassStorage/msc_esp32_file_browser Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -61,16 +61,12 @@ Adafruit_SPIFlash flash(&flashTransport);
61
61
// file system object from SdFat
62
62
FatFileSystem fatfs;
63
63
64
- // FatFile root;
65
- // FatFile file;
66
-
67
64
// USB Mass Storage object
68
65
Adafruit_USBD_MSC usb_msc;
69
66
70
67
bool fs_formatted; // Check if flash is formatted
71
68
bool fs_changed; // Set to true when PC write to flash
72
69
73
-
74
70
const char * host = " esp32fs" ;
75
71
WebServer server (80 );
76
72
// holds the current upload
@@ -330,7 +326,7 @@ void handleFileCreate() {
330
326
if (exists (path)) {
331
327
return server.send (500 , " text/plain" , " FILE EXISTS" );
332
328
}
333
- File file = fatfs.open (path, O_WRITE);
329
+ File file = fatfs.open (path, O_WRITE | O_CREAT );
334
330
if (file) {
335
331
file.close ();
336
332
} else {
You can’t perform that action at this time.
0 commit comments