question

april-beckett4703 avatar image
april-beckett4703 asked ak commented

Processing TIFF Attachments in RingCentral using NodeJS

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!

sdk
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

ak avatar image
ak answered
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
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

april-beckett4703 avatar image
april-beckett4703 answered
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.
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

april-beckett4703 avatar image
april-beckett4703 answered
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.
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

ak avatar image
ak answered ak commented

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 :

  • Email the developer support team with the necessary details or submit a support ticket and we could take a look at the logs to investigate more.

Thanks!

1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

ak avatar image ak commented ·
Hi April,

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

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys