can not open the file in sd card(wav)

it exist … on my computer monitor…
and can play…ㅠㅠ

Sending POST request to web server
log> phpoc_spi: resync spi channel…success
log> phpoc_begin: shield package version 1.0.1
log> phpoc_begin: WiFi INFRA s-lab2 ch11
log> phpoc_begin: IPv4 192.168.120.46 255.255.255.0 192.168.120.1 203.248.252.2
initialization failed!
initialization done.
disconnected
log> phpoc_dns: query A 192.168.120.23 >> 192.168.120.23
log> phpoc_client: connect 2 >> success
initialization failed!
initialization done.
error opening test.wav

#include <SPI.h>
#include <Phpoc.h>
#include <pcmConfig.h>
#include <pcmRF.h>
#include <SD.h>
#include <TMRpcm.h>
#include <SPI.h>
#define SD_ChipSelectPin 53
char server_name = “192.168.120.23”;
TMRpcm audio;
File myFile;
PhpocClient client;

void setup() {
Serial.begin(9600);
while(!Serial)
;

Serial.println(“Sending POST request to web server”);

Phpoc.begin(PF_LOG_SPI | PF_LOG_NET);
SD.begin(SD_ChipSelectPin);
audio.CSPin = SD_ChipSelectPin;
if (!SD.begin(4)) {
Serial.println(“initialization failed!”);

}
Serial.println(“initialization done.”);

}

void loop() {
if(client.available())
{
char c = client.read();
Serial.print(c);
}

if(!client.connected())
{
Serial.println(“disconnected”);
client.stop();
delay(5000); // wait 5 seconds

if(client.connect(server_name, 80))
{
if (!SD.begin(4)) {
Serial.println(“initialization failed!”);

}
Serial.println(“initialization done.”);

if (SD.exists(“TESTT.WAV”)) {
Serial.println(“testt.wav is existed”) ;
}

myFile = SD.open(“testt.wav”,FILE_WRITE);

if (!myFile) {
// if the file didn’t open, print an error and stop
Serial.println(“error opening test.wav”);
while (true);
}

uint16_t wavlen = myFile.size();
Serial.println(wavlen);
uint16_t extra_length;

String start_request = “”;
String end_request = “”;
start_request = start_request +
“\n–AaB03x\n” +
“Content-Disposition: form-data; name=“userfile”; filename=“testt.wav”\n” +
“Content-Transfer-Encoding: binary\n\n”;
end_request = end_request + “\n–AaB03x–\n”;
extra_length = start_request.length() + end_request.length();
Serial.println(“Extra length:”);
Serial.println(extra_length);
uint16_t len = wavlen + extra_length;
uint16_t full_length;
full_length = start_request.length() + len + end_request.length();

myFile.read();
Serial.write(myFile);
Serial.println(“done2”);

client.println(“POST /examp1.php HTTP/1.1”);
client.println("Host: ");
client.println(“Content-Type: multipart/form-data; boundary=AaB03x”);
client.print("Content-Length: ");
client.println(full_length);
client.print(start_request);
client.write(myFile);
static const size_t bufferSize = 1024;
static uint8_t buffer[bufferSize] = {0xFF};
while (len) {
size_t will_copy = (len < bufferSize) ? len : bufferSize;
SPI.transfer(&buffer[0], will_copy);
if (!client.connected()) break;
client.write(&buffer[0], will_copy);
len -= will_copy; }
client.println(end_request);
}}}

file size is 1000000

You haven't helped yourself with identical debug messages issued from different places. What is the file name test.wav or testt.wav ? It is also good to be consistent in the use of upper/lower case in file names even when not strictly necessary.

DID I UPLOAD WRONG PLACE.... HOW CAN I DELETE... I WANT TO CHANGE AND THANK YOU FOR YOUR ADVICE

byte wCount = 0; // For counting # of writes while (jpglen > 0) {

uint8_t *buffer; uint8_t bytesToRead = min(64, jpglen); // change 32 to 64 for a speedup but may not work with all setups!

buffer = cam.readPicture(bytesToRead); client.write(buffer, bytesToRead);

if(++wCount >= 64) { // Every 2K, give a little feedback so it doesn't appear locked up Serial.print('.'); wCount = 0; } jpglen -= bytesToRead; }

can you guys change "buffer = cam.readPicture(bytesToRead);" for sd card? i want to read file from sd card.... so readpicture for adafruit does not work. i think readpicture api using for read bytes ... and then put it into the buffer... then transfer to the server... thank you for reading...

Serial.println("Sending POST request to web server");

That may be what the program does, not that is NOT what is happening when the statement is printed.

#include <Phpoc.h>

When you use non-standard libraries, and fail to post links to them, you are just wasting our time.