Encontrar

Question
· Sep 23, 2024

Large Stream to base64Encoded

I have below method , which receives a PDF ; this method throws error for a PDF file of 3MB size

 <MAXSTRING>zBase64Encode+9 -- logged as '-' number - @'    set encodedData = $system.Encryption.Base64Encode(content)'

How do I fix this.

----------------

ClassMethod Base64Encode(pStream As %Stream) As %Stream
{
  set tSC = $$$OK
  set tSC = pStream.Rewind()  
  s pEncoded=##class(%Stream.GlobalCharacter).%New()  
  while 'pStream.AtEnd {   
    Set tLen = pStream.Size    
    set content = pStream.Read(.tLen)    
    set encodedData = $system.Encryption.Base64Encode(content)
    set encodedData=$translate(encodedData, $c(13,10))
    s tSC=pEncoded.Write(encodedData)   
    q:$$$ISERR(tSC)
  }
  //q:$$$ISERR(tSC)  
  do pEncoded.Rewind()  
  Quit pEncoded
}

2 Comments
Discussion (2)1
Log in or sign up to continue
Announcement
· Sep 23, 2024

Time to vote in the InterSystems Developer Tools Contest

Hi Community,

It's voting time! Cast your votes for the best applications in our Developer Tools Contest:

🔥 VOTE FOR THE BEST APPS 🔥

How to vote? Details below.

Experts nomination:

InterSystems experienced jury will choose the best apps to nominate the prizes in the Experts Nomination.

Community nomination:

For each user, a higher score is selected from two categories below:

Conditions

Place
1st 2nd 3rd
If you have an article posted on DC and an app uploaded to Open Exchange (OEX) 9 6 3
If you have at least 1 article posted on DC or 1 app uploaded to OEX 6 4 2
If you make any valid contribution to DC (posted a comment/question, etc.) 3 2 1

 

Level

Place
1st 2nd 3rd
VIP Global Masters level or ISC Product Managers 15 10 5
Ambassador GM level 12 8 4
Expert GM level or DC Moderators 9 6 3
Specialist GM level 6 4 2
Advocate GM level or ISC Employees 3 2 1

Blind vote!

The number of votes for each app will be hidden from everyone. Once a day we will publish the leaderboard in the comments to this post. 

The order of projects on the contest page will be as follows: the earlier an application was submitted to the competition, the higher it will be on the list.

P.S. Don't forget to subscribe to this post (click on the bell icon) to be notified of new comments.

To take part in the voting, you need:

  1. Sign in to Open Exchange – DC credentials will work.
  2. Make any valid contribution to the Developer Community – answer or ask questions, write an article, contribute applications on Open Exchange – and you'll be able to vote. Check this post on the options to make helpful contributions to the Developer Community.

If you change your mind, cancel the choice and give your vote to another application!

Support the application you like!


Note: contest participants are allowed to fix the bugs and make improvements to their applications during the voting week, so don't miss and subscribe to application releases!

5 Comments
Discussion (5)5
Log in or sign up to continue
Digest
· Sep 23, 2024

Publicações Desenvolvedores InterSystems, Setembro 16 - 22, 2024, Resumo

Digest
· Sep 23, 2024

InterSystems Developers Publications, Week September 16 - 22, 2024, Digest

Articles
Announcements
Questions
#InterSystems IRIS
#Ensemble
#InterSystems IRIS for Health
#Caché
#Other
September 16 - 22, 2024Week at a GlanceInterSystems Developer Community
Discussion (0)1
Log in or sign up to continue