Using Mule, how to create a password-protected .csv file that can be opened with a standard tool? - mule

I have been asked to create a password-protected .csv file. This would be similar to password protecting in Excel or Word.
An option I suppose would be to create a password-protected .zip of the .csv file. On the recipient's end, they need to open the file using a standard tool like zip/7zip/Excel/etc., where they supply a password.
Is there a straightforward way to do this in Mule?

One option would be to use Apache POI to output the encrypted Excel file from a custom Mule component (either a Java, Scripted or MEL component).
See: Encryption in Apache POI

Related

How to download and send file from uiLicious

I am using uiLicious basic plan to perform UI-testing and monitoring, I have one task which is,
I need to download the file from a site and send it to someone via mail. That file is a CSV specifically.
Is there any way in uiLicious to use the downloaded files from the memory?

Office URI Fails to Open in Word when using S3 PreignedURL

I'm attempting to allow a user in a web application to download a Word document and open it directly in Word. We store our files in AWS S3. As such, I am thinking I can use the Office URI Schemes to do so. I'd provide a S3 presigned URL and let Word take care of the rest.
I'm running into an issue where Word can't open the file. I get a dialog in Word that says "Sorry, we couldn't open ". I'm lost where to start debugging. Is this even possible?
Open in Word
When Word attempts to open the file, it looks like it fetches it not with a simple HTTP GET, but instead using the WebDAV protocol, which of course presigned URLs do not support.
I decided to use Milton to serve files stored in S3 through WebDAV.

Export file from NetSuite's FileCabinet to FTP

File resides in the NetSuite file cabinet and needs to be placed on an FTP server each day.
I'm not sure how to handle this via Suitelet/RESTlet, or if it's possible - but would prefer to not use an external source/application.
My current and hopefully temporary workaround is a local scheduled task to run a script to pull files from NetSuite & upload to the FTP.
In SuiteScript 2.0, although unsecured FTP is still not support, but SS2.0 has the capability to do SFTP. See http://www.upilioconsulting.com/blog/netsuite-2016-2-sftp-suitescript-2-0/
In SuiteScript 1.0, it's not supported. The workaround is that you'll need to write a middleware code (i.e. in PHP) and let the middleware do the FTP transfer.
Netsuite doesn't interact with FTP.
You need a bridge server of some sort that runs a web app (full blown Apache or nginx running PHP or just a simple Node service)
Just get a server and install some web server/web service and POST your files to it (nlapiRequestURL with a Scheduled script). Have the web app on the bridge server send the files to the FTP server. If you are using Netsuite you can afford the cost of the bridge server.
One possible solution is to create a saved search on the Documents to list out all the files in Netsuite filtering by createdate or lastmodifieddate. Create a scheduler to fetch only the new files and save them locally where you want.
Note all the files will be in base64 encoded string format, you need to decode again to obtain the file.
As bknights said NetSuite doesn't support FTP. You need a web server(any server side language can do for that matter, I have written one in Node.js), to receive the files.
The file content for text file will be in Text format, so, no decode logic required for text files. However, binary/pdf/image and other would be in base64 format, as NetSuite's JS has no way of handling binary data. So, make sure you decode it before you create the file on your FTP Server.

Upload entire directory via FTP in VB.NET

I have successfully been able to upload single files to an FTP with this:
My.Computer.Network.UploadFile
Is there a way to upload an entire directory, such as this:
My.Computer.Network.UploadFolder
Never worked with FTP in VB.NET, but it seems there is no direct way to do it.
Here is what people say about how it can be done:
Traversal the local directory
Create the same directory structure in the FTP server.
Upload the file in each local directory.
Also see here for same question answered (C#). It confirms there is no built-in way. You would have to write some code or use 3rd party libraries.

Is there a way to directly edit files on a server?

Is there anyway to directly code on a server, meaning you open the file from the server and save it there?
Or is there any method faster than traditional ftp that automatically syncs to the server when you save locally?
Using SVN is a good option.
Read this: Combined SVN FTP system
If you're just talking about text files then some text editors support this, e.g. BBEdit, which can open and save directly to/from FTP/SFTP etc.