You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've been trying to use Envaya to post MMS files onto a server but all image file sizes are zero. SMIL files appear ok. Below is a print out of the $_FILES array we're receiving from the App.
I was having the same issue. after a few days of messing with the code I noticed this method was returning empty bytes[]
`
public byte[] getData() throws IOException
{
int length = (int)getDataLength();
byte[] bytes = new byte[length];
int offset = 0;
int bytesRead = 0;
InputStream in = openInputStream();
while (offset < bytes.length)
{
bytesRead = in.read(bytes, offset, bytes.length - offset);
if (bytesRead < 0)
{
break;
}
offset += bytesRead;
}
in.close();
if (offset < bytes.length)
{
throw new IOException("Failed to read complete data of MMS part");
}
return bytes;
}
`
I updated the method to this and now it works:
` public byte[] getData() throws IOException
{
InputStream inputStream = openInputStream();
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
int nRead;
byte[] data = new byte[RAW_DATA_BLOCK_SIZE];
We've been trying to use Envaya to post MMS files onto a server but all image file sizes are zero. SMIL files appear ok. Below is a print out of the $_FILES array we're receiving from the App.
Android 5.1
HTC Desire 626
`
(
[part0] => Array
(
[name] => smil.xml
[type] => application/smil
[tmp_name] => /tmp/phph7vfqn
[error] => 0
[size] => 259
)
)
`
Would really appreciate any help.
The text was updated successfully, but these errors were encountered: