Hi
Does anyone know if there’s a way to determine the size of a message in an inbox waiting to be downloaded? The online documentation doesn’t seem to mention a specific endpoint for this and the metadata endpoint doesn’t provide this info.
Hi
Does anyone know if there’s a way to determine the size of a message in an inbox waiting to be downloaded? The online documentation doesn’t seem to mention a specific endpoint for this and the metadata endpoint doesn’t provide this info.
Hi Lee,
Unfortunately not. The Head Message endpoint will give you the total number of chunks in the mex-Total-Chunks
header but not the size of each chunk, nor the overall size of the message.
Do you have a particular use case for wanting to know that information?
Best regards,
Dave
Hi Dave
Thanks for the clarification. The user case would be if we wanted to limit the size of downloads.
Thanks Lee. Are you anticipating ignoring messages over a certain size? e.g. if someone sent you a 1GB message you wouldn’t download it?
Hi Dave, yes that’s it essentially. According to the docs we could receive a 20GB message so we’re exploring the possibility of capping this.
Hi Lee,
I don’t know what kind of data you are anticipating receiving, but I would assume that someone or something is sending you that data for a particular purpose, so I would recommend that you download the message and if it’s something that you can’t handle due to its size, contact the sender to discuss why and identify how it could be sent in more manageable chunks.
One option might be that if you are downloading the message chunk by chunk and it exceeds a threshold, you could abort the download and acknowledge the message (although of course you haven’t actually done anything with it, so that might be misleading) to remove it from your inbox. Of course that would give the impression that you have successfully received the message.
Hope that helps in some way.
Best regards,
Dave