electronicsguy / HTTPSRedirect

A library for seamless data logging, communication and control for Internet of Things
GNU Affero General Public License v3.0
59 stars 26 forks source link

[Question] #4

Open FHanus opened 2 years ago

FHanus commented 2 years ago

Would it be possible to upload files (~32kB) to Google Drive? I am stuck on trying to edit the provided code in a way to achieve this.

github-actions[bot] commented 2 years ago

Welcome to HTTPSRedirect! Please provide enough info to debug the issue.

FHanus commented 2 years ago

I am trying to edit the code in order to upload a whole ".wav" file to Google Drive rather than add a line to an existing text file. Is this possible? Sample code that I think would need to be edited:

// Send memory data to Google Sheets payload = payload_prefix + free_heap_before + "," + free_stack_before + payload_suffix; client->POST(url2, host, payload, false); payload = payload_prefix + ESP.getFreeHeap() + "," + ESP.getFreeContStack() + payload_suffix; client->POST(url2, host, payload, false);

Serial.println("\nGET: Write into cell 'A1'"); Serial.println("=========================");

// fetch spreadsheet data client->GET(url, host);

// Send memory data to Google Sheets payload = payload_prefix + ESP.getFreeHeap() + "," + ESP.getFreeContStack() + payload_suffix; client->POST(url2, host, payload, false);

Serial.println("\nGET: Fetch Google Calendar Data:"); Serial.println("================================");

// fetch spreadsheet data client->GET(url2, host);

// Send memory data to Google Sheets payload = payload_prefix + ESP.getFreeHeap() + "," + ESP.getFreeContStack() + payload_suffix; client->POST(url2, host, payload, false);

Serial.println("\nSeries of GET and POST requests"); Serial.println("===============================");

Serial.printf("Free heap: %u\n", ESP.getFreeHeap()); Serial.printf("Free stack: %u\n", ESP.getFreeContStack());

// delete HTTPSRedirect object delete client; client = nullptr;