0

I have a program written in Node using the "RingCentral" package, the program downloads faxes sent to a RingCentral account. When the faxes are in PDF format everything works correctly, however if the fax attachment happens to be a TIFF image (only very few are) the data returned seems to be incomplete, it is always 390 bytes. Inspecting the file shows that it is indeed the TIFF image (starts with II*).

Has anyone come across this issue? Is there a way to force all faxes to be stored as PDF by RingCentral?

Thanks,

-Carlos

Grokify
  • 15,092
  • 6
  • 60
  • 81
  • Couldn't this be the result of an aborted transmission of some kind, resulting in some kind of 0x0 or 1-line file? What's the size of the TIFF (width/height)? Is the TIFF actually valid? What happens if you call your fax number with something other than a fax? Does it actually register a received fax? – jcaron Apr 03 '17 at 14:15
  • Thanks for replying! Seems to be pretty consistent, the TIFF file is not valid, seems to be missing data, perhaps something to do with the HTTP response being multi-part and the RingCentral NodeJS module not processing it correctly, the response is 200 OK. It does work with PDFs though, even large ones (40+ pages) but with the TIFF attachment it doesn't. All the TIFFs I've seen are very small, one page and mostly empty space. – Carlos Galavis Apr 03 '17 at 14:28
  • Is there any other way you can access those files (i.e. via a web UI)? Do you get te same thing? Do you have any other status info about the call (e.g. success / aborted / call dropped...)? It may be that you get TIFFs when the TIFF-to-PDF conversion fails, which is due to the TIFF being invalid, which in turn may be due to the call being dropped. Note that I was referring to the fax call, not the webservice when I wrote "aborted transmission". – jcaron Apr 03 '17 at 15:15
  • Yeah, and they work through their web interface. – Carlos Galavis Apr 03 '17 at 16:13
  • And what do you get through the web UI? A PDF? A TIFF? Anything special about them? – jcaron Apr 03 '17 at 16:18
  • I am not sure how to tell, the web interface doesn't seem to give you that information, just and embedded viewer with the document displayed. As far as I can tell the only thing special about them is that they tend to be small, but I don't have enough samples to be sure. There are also plenty of small faxes that come in as PDF. – Carlos Galavis Apr 03 '17 at 16:43
  • If it's a web interface you can definitely find out what file format it is... Just open the Network tab of you favorite browser's developer tools. – jcaron Apr 03 '17 at 16:45
  • Oh, of course, I feel stupid :( Thanks for the tip, I'll take a look. – Carlos Galavis Apr 03 '17 at 17:04
  • After rerunning my test again I realized these faxes are also having problems through the web interface, so the attachment must be corrupted for some reason. There are a lot of faxes in this account and I must have clicked on a different fax before. Sorry for the confusion. I am working with RingCentral to find out why these faxes are showing up as successfully received but have a corrupted attachment. Thanks for for the help. – Carlos Galavis Apr 03 '17 at 17:40

2 Answers2

2

RingCentral supports storing faxes as PDF and TIFF files. The configuration preference is available per extension. Upon retrieval, the Content-Type HTTP response header will be set to application/pdf or image/tiff

You could check to see if the response header has "Content-Type" : 'image/tiff', so as to save the attachment as .tiff file format when you retrieve the faxes via the message-store endpoint :

GET /account/~/extension/~/message-store

For more information you could refer to our RingCentral-Fax-FAQ

For any support related issues, please open a case with our developer support at :

Portal : https://developer.ringcentral.com/support.html
Email : devsupport@ringcentral ( with the necessary details )

CarpeDiem
  • 131
  • 3
0

After rerunning my test again I realized these faxes are also having problems through the web interface, so the attachment must be corrupted for some reason.

Glad you found your issue and it was due to actual corrupted faxes in the comment thread. For others that come across this, here's some information on how to test TIFF files.

if the fax attachment happens to be a TIFF image (only very few are) the data returned seems to be incomplete, it is always 390 bytes[...] Has anyone come across this issue?

Downloading TIFF images works fine for me using the RingCentral API. I used the fax_download.rb script in the community Ruby SDK. I used the fax_send.rb demo script to send the test_file.pdf included in the SDK to an extension configured for TIFF files and was able to download and read it as a 14538 byte TIFF file using the fax_download.rb script.

Resource links:

Is there a way to force all faxes to be stored as PDF by RingCentral?

There is a file type configuration setting for PDF and TIFF per extension as mentioned by @CarpeDiem above. Having all extensions configured for PDF would ensure all stored faxes were in PDF format. This can be set by RingCentral support on the backend, but I'm not sure if there is a customer facing setting.

Grokify
  • 15,092
  • 6
  • 60
  • 81