POST File Lotusscript

The only way I know how to upload a file to domino is with a File Upload control (or just mimicking it using HTML in a form).

I’m developing an android APP and I want the app to post a file up to my domino server. The development kit I’m using (MIT App Inventor) allows me to post a file to a URL.

Anyone know how’d handle that server site when the post request arrived? Can domino handle something like this? I saw some code allowing flex to do something similar.

Any feedback would be much appreciated.

Subject: re base 64

OK, thanks for that Danny. II need to check this android app builder I’m using and see if I can send the files in base 64! Thanks for your help with this, and the link.

Subject: RE: Base 64

Yes, some people use it for that as well. For all intents and purposes, it’s just a string representation of a file. There are Base 64 Encode/Decode libraries for just about any language. If you’re using LotusScript on the back-end, you can use this library: http://wwwendt.de/tech/base64/libBase64.lss http://wwwendt.de/tech/base64/libBase64.lss

NOTE: Base 64 is not an encryption of any sort so it’s not secure.

Subject: Re: POST File Lotusscript

Since there hasn’t been any suggestions yet, you could Base64 the file in your app then POST the resulting string to your domino URL. Then, in your agent read in the Request_Content CGI variable. Note: If the Request_Content is too big, it’ll break em up into Request_Content_nnn (nnn = 000, 001, 002). Alternatively, you could create a webservice provider in your database and pass the Base64 string to that. I hope this helps.

Subject: Base 64

Hi Danny, thanks for your reply. WHen you say base64 is that similar to how you can embed an image within HTML without using a separate image file?