Skip to main content
Nintex Community Menu Bar
Solved

Need a dll to convert a file from a url location to base64.

  • October 23, 2017
  • 8 replies
  • 41 views
  • Translate

Currently on a project and need a dll to convert a file from a url location to base64. Apparently i have a dll file that can convert file from a local folder to base64, but cannot use that to convert from url to base64.

 

The file with url looks like this:

 

www.standardfocus.comTestFolderTesttrip25782.pdf

www.standardfocus.comTestFolderTesttrip23482.xlxs

www.standardfocus.comTestFolderTesttrip25782.docx

 

I would love to have all possible idea/solution that can help with this.

 

Regards.

 

Best answer by Kran

Hi kolade,

Forget to tell about this behaviour pls try to use it in view u will be able to see the result.

Once I will get the time I will look @ this issue why it's not appearing in tester. And send u proper fix..
View original

Forum|alt.badge.img+9
  • October 24, 2017

Hi Kolade,

 

First convert the URL to Bytes and then bytes to base64.

 

 URl to byte :

 

 HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);

HttpWebResponse response = (HttpWebResponse)req.GetResponse();
stream = response.GetResponseStream();

using (BinaryReader br = new BinaryReader(stream))
{
int lenth = (int)(response.ContentLength);
buf = br.ReadBytes(lenth);
br.Close();
}

  

byte to Base 64: 

  
_byte=buf;
_sb.Append(Convert.ToBase64String(_byte, 0, _byte.Length));

  let me know if this helps you.

 

Translate

  • October 24, 2017

Thank you Karan Verma.

 

I would implement and revert back.

 

BR.

Translate

  • December 29, 2017

Hello Karan,

 

As regards the code outline you gave me on the URI to base64. Apology for the late response.

 

I like to add that, am not a code person. Wanted to know if you could help transform the code into a usable format. Would more than appreciate that.

 

With much respect,

Kolade.

Translate

Forum|alt.badge.img+9
  • January 5, 2018

Hi kolade,

 

Find attached dll. There are two methods one return string having  base64 data and other return list with base64 data and file name.

Translate

  • January 5, 2018

Hi Karan,

 

Many thanks for your help, and for reaching out.

 

Howbeit, after testing the SMO from the dll, here is the result;

 

1. The SMO method 'URLtoBase64WithFileName' only return the FileName.

2. The SMO method 'URLtoBase64' did not return any value.

 

In conclusion, both methods did not return the base64.

 

Thanks for the effort.

 

Regards,

Translate

Forum|alt.badge.img+9
  • January 5, 2018
Hi kolade,

Forget to tell about this behaviour pls try to use it in view u will be able to see the result.

Once I will get the time I will look @ this issue why it's not appearing in tester. And send u proper fix..
Translate

  • January 10, 2018

Hello Karan,

 

Thanks for the help with the dll for converting url to base64. Your solution came in very handy.

 

Am not sure if you have a dll that can also help convert an ADO query to csv file (Comma seprated value).

 

I will be more than grateful if I can have the resource for ADO query to csv file.

 

Many thanks for your support.

 

Best regards,

 

Kolade.

Translate

Forum|alt.badge.img+9
  • January 13, 2018

Hi kolade,

 

Check your Inbox.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings