Send images through Worklight server without base64 encoding - ibm-mobilefirst

I want to upload image through worklight adapter in case of desktop browser and for IOS, android devices also, could you please suggest how we can post image through adapter. I find some example to post image as base 64 object.
Please provide me any reference by which we can upload image as multipart form data.

You cannot do this using JavaScript adapters in Worklight. You could perhaps do this using Cordova or AJAX, but I'm pretty sure you should use base64 encoding there as well.
The only other possibility for you to send binary is by using Java adapters.
Java adapters were introduced starting MobileFirst Platform (previously "Worklight") 7.0.
You can learn about Java adapters (basically a JAX-RS application), here: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/server-side-development/adapter-framework-overview/

Related

Can we build a full stack webapp with kotlin?

Kotlin official documentation tells that it supports web development. And its replacement for java. I am trying to build a web application using Kotlin. So far I read so many blogs, courses and videos in YouTube but I did not succeed coming up with a flow. I came across this link https://medium.com/bcgdv-engineering/building-a-full-stack-web-app-in-kotlin-af8e8fe1f5dc and I could not proceed with this alone. I only need a front end and connect to my server with normal http request. Is there any right way of doing a web app in kotlin. Please help me with this. Thanks in advance!
What I use for developing web apps in Ktor:
Front-End:
FreeMaker - for templating (mustache and velocity are other options)
Bootstrap - for HTML - CSS - Javascript part
There is also Kotlinx.html and KotlinJS if you need to write them Kotlin Style and they are official toolset from JetBrains.
Kotlinx.HTML Github
KotlinJS
You can add functionality to Ktor itself (they are called features):
Features:
GSON - for content negotiation (converting Kotlin to JSON and visa versa)
Locations - for type-safe routing
Exposed (Interface for easily working with PostgreSQL, MySQL and SQLite that works based on JDBC drivers)
Authentication (for user auth)
Ktor website has detail documentation for all of these features and adding them in your project is so easy.
Add the dependency
install(FEATURE) in Application.
For the IDE side:
IntelliJ Ultimate (Ultimate supports .ftl for FreeMarker)
Ktor plugin which is a must-have when you install IntelliJ
For webserver engine:
Netty (I use this one)
Tomcat
Jetty
You can easily develop API and Wen Apps using Ktor amazing DSL (Domain Specific Language)
The only problem that I have is with Kotlin Coroutines which I hate, and prefer RxKotlin for developing asynchronous apps, it seems that's possible but there are not enough tutorials and samples out there to get started with it.
+ If you stuck on something new and challenging, you are on your own, as there are not enough samples and guides on the internet.
But at the end of the day, I only recommend Ktor to those android developers who don't want to learn web development language e.g. PHP, Phyton, Javascript, like myself.

How to receive native messages from chrome extension to Mac app?

I have a Chrome extension which gets the location URL and I want it to send that URL to a Mac app.
I was able to run this demo, but I don't know how I can receive the message in a Mac app. Where would get I the message?
There are two approaches you can use.
Native Messaging API. This does have the limitation that Chrome must launch the process and communicate to it through stdio,
conforming to native message API protocols .
Your native app can expose a web server on a local port. The
extension can then try to connect to this port and talk to your app.
I would suggest the first solution as its a pretty secure soultion.

Social Business Toolkit: Sametime chat only with local installed Sametime Client possible?

I'm using SBT SDK on a XPage.
After mastering a few traps at the beginning it works fine.
Livenames are properly displayed.
But now a got another problem.
If you click on a available person, a context menu is displayed, where you can choose 'CHAT' or 'VCARD'.
If I click on CHAT a URL like this ist called:
http://localhost:59449/stwebapi/loggedin?jsonp=stproxy.connect.callback.setAvailable&wait=true&time=1407834968761&fqdn=sametime.lotus.com
I found out that you have to install Sametime Connect Client locally at every computer, because it is providing a small webserver at port 59449.
That's impossible because I want to use Sametime on a public website.
I'm pretty sure that there is another way.
Somebody an idea?
thanks
Marcus
#user2776693 - There are two ways:
1 - using the Sametime Local Web API
The local web api uses a configurable port (the default is mentioned above), to communicate back and forth from a web site which embeds or calls the configurable port using jsonp, meaning the javascript of the site wraps the sametime calls.
2 - using the Sametime Web Chat/Web Proxy
It means that the Sametime Web Chat is embedded as JavaScript on the page, and loaded using the appropriate JS libraries, and can have some pretty advanced features. There is a demo site off of greenhouse.lotus.com, and you can sign up for an account on that site.
you can download the sdk, and find many examples of using the local web api and web chat.
http://www14.software.ibm.com/webapp/download/nochargesearch.jsp?q0=&k=ALL&S_TACT=104CBW71&status=Active&b=Lotus&sr=1&q=sametime+sdk&ibm-search=Search
Download Version 9.0 IFR1
Extract with Zip
Go to Examples and samples

Is it at all possible to make HTTP requests with the Adobe Photoshop JS SDK?

I've been looking at the Adobe Photoshop JavaScript Scripting documentation, and have only seen the use of WebSockets for remote communications. I need to implement a plugin that communicates with a backend PHP API written in Laravel.
Does the Photoshop JavaScript SDK allow HTTP requests at all?
I use a modified version of the extendables library to allow Indesign to access data from our local webserver. I don't see any reason why it wouldn't work with photoshop. See extendables.org for the library.
ETA: That link doesn't seem to go anywhere at the moment. The library itself is available here: https://github.com/stdbrouw/Extendables

Integrate fiddler with Flex technology

How can I integrate fiddler with Flex 3? Flex uses - AMF protocol to exchange messages.
Can someone please help me in integrating Fiddler with Flex technology?
I don't really know what you mean by "integrate", but Fiddler should see your Flex traffic just fine. A community member has written an Inspector object for the AMF format; he's posted the archive in the Files section of the Fiddler Google Group: http://groups.google.com/group/httpfiddler
You can download an inspector plugin for AMF from http://amfparser.codeplex.com/.
Just download the dll, put it into Fiddlers "Inspectors" folder and restart Fiddler. Now you should have a new "AMF" view within the inspectors view.
I tried to use Fiddler 4 with amf parser but no success it was showing all garbage data. I found Charles Proxy similar to Fiddler but not that advanced but it has great amf support and i was able to see all the requested response properly.
https://www.charlesproxy.com/