Processing TIFF Attachments in RingCentral using NodeJS

  • 1
  • Question
  • Updated 1 year ago
  • (Edited)
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!

Photo of April Beckett

April Beckett

  • 140 Points 100 badge 2x thumb

Posted 1 year ago

  • 1
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
April,

The faxes when you download using our API's would store them as PDF files. I tried to replicate the issue but I am able to download the file as a .PDF format.

Scenario :
  • Send a fax to a Ringcentral Account / Extension with a ( *.tif) file format as attachment
  • Retreive the fax by making the below API call : 
  • GET /account/~/extension/~/message-store
Also, I do perform a small check to see if the response header has "Content-Type" : 'application/pdf', so as to save the attachment as .pdf file format. 

Kindly refer to this sample ( demo ) PHP application to know more :
https://github.com/anilkumarbp/ringcentral-demos-data-archival/blob/master/demo/messageStore.php
Photo of April Beckett

April Beckett

  • 140 Points 100 badge 2x thumb
Thanks for the reply!

When I read the message through the API, the contentType is set to "image/tiff", this is for a very small number of faxes, most of them come in as PDF. I am only fetching received faxes, and this is confirmed by looking at the messageStatus which is "Received".

I'll try the sample application to see if I can learn more.
Photo of April Beckett

April Beckett

  • 140 Points 100 badge 2x thumb
After rerunning my own test again I realized these faxes are also having problems through the web interface, so the attachment must be corrupted for some reason. I must have clicked on a different fax before. Sorry for the confusion.

I do wonder why some of these (and again, they are very few) are like this, is as if the reception process failed at some point by the fax shows on the message tab as if it had been received successfully.
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
I am not exactly sure as to why the faxes are failing during the reception process Could you provide logs ( if you have any ) for these requests please ?  ( please do not publish any sensitive data on the logs )

You could also open a support case via :
Thanks !
Photo of AK

AK, Official Rep

  • 4,372 Points 4k badge 2x thumb
Hi April,

Have you created the case yet ? If so could you provide the Case Number for us to look into ?