Send file from sd card to server

// i am using spiffs in here recode it sd !!! tryout
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <FS.h>

#define FILE "/atc.mp3" /change it
#define TYPE "mp3" /change it
#define URL "http://192.168.1.2/" /change it
#define SSID "wifissid" //change it
#define PSK "password" //change it
#define DBG Serial

void setup() {
DBG.begin(115200);
DBG.println("starting...");
WiFi.begin(SSID, PSK);
while (!WiFi.isConnected()) {
DBG.println(".");
delay(1000);
}

if (!SPIFFS.begin())
DBG.println("failed to start SPIFFS!");
}

void loop() {
static bool cloud_send = false;
if (!cloud_send) {
cloud_send = true;

auto f = SPIFFS.open(FILE, "r");
const auto f_size = f.size();

WiFiClient client;
HTTPClient http;
http.setUserAgent(String("ESP ") + String(ESP.getChipId()) + " " + FILE + " " + TYPE);
http.addHeader("Content-Type", "text/plain");
http.addHeader("Content-Length", String(f_size, DEC));
if (!http.begin(client, URL)) {
DBG.println("\nfailed to begin http\n");
return;
}

int http_code;
const auto A = millis();
http_code = http.sendRequest("POST", &f, f_size); //boom the misery sloved
DBG.printf("\n time-keep: %lus", (millis() - A) / 1000);
http.writeToStream(&DBG);
http.end();
f.close();
}
delay(10000);
}