watson assistant can't display image from my computer - watson-assistant

okay i'm building a chatbot. I created a new node and assign its response type to "image", but watson assistant can't display image directly from my computer.
Warning: Cannot load image from url: C:\Users\R.I.S.E\Documents\passport\me.jpg

It's cool that you're working on a chatbot! The problem you're running into doesn't have much to do with Watson Assistant, though; you've bumped into a fundamental security design with browsers and web services. That is, unless you explicitly upload an image to a third party service, that service can't access any data on your local computer (which is a good thing, where security is concerned).
Watson Assistant doesn't accept image uploads, so you need to host your image somewhere and then use its URL in the dialog response.
Try using a service like Imgur to upload your image, then get the link for it (you can usually right-click on the image and choose something like "copy image address") and use that URL in your bot's response. That should work!

Related

Get downloads & file browsing requests from HTMLFrame

I am able to load and display files using the HTMLLoader class. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/html/HTMLLoader.html
Problem is, when a user navigates to a download link or an upload button, nothing happens. I heard somewhere that any downloads get sent over to the user's main document folder. Anyway to intercept this and get some details? Someone in my browsing history suggested to somehow get it using the Socket class to fetch it's data and control where it would go using the File class. I couldn't make out the demonstration.
Bonus question...what properties do I have to set to make Google understand that this browser is not a bot? I get this in plain text when trying to navgiate to http://www.google.com . It's other services work completely fine though.
Google
Sorry...
We're sorry...
... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.

Is it good idea to allow users to use remote image url as Avatar?

I am working on online community where users will have the profile page , where he can upload the image of his choice or give the url of the remote image .
So Is it good to just store the remote image url and not the image itself and use it like this on profile page like this
<img src="remote_image_url">
or download the image from remote url and store it on the local/our server for the later use like this
<img src="path_on_our_server">
i am thinking from the hack-proffing point of view , as are there any issues if i allow users to use remote image and use it as it is instead of downloading it on to our servers ?
You should store the image, loading a remote URL which you don't have control over is always dangerous.
To expand:
A user adds their avatar as www.example.com/pic.jpg. They then notice that you are simply including that URL on your site, so they change their avatar to www.example.com/hack.js and you still include this file so now any JS they add in that file will be ran on their site.
A embedded JS inclusion like this is a hackers dream and is DEFINITELY a HUGE security flaw. If you want to read a bit about a real life example of one of these attacks, ebay was caught out by one last year - http://www.infosecurity-magazine.com/news/ebay-under-fire-after-cross-site/
Think about what risks you are trying to mitigate.
Whether you let users upload images to your site or add links to remote image locations, bad people will do bad things. If you let people upload images to your server, there could be attack vectors against your server (vulnerability in image processing libraries triggered by deliberately malformed images). If you let people add links to remote images, the remote images could be malicious to target browser vulnerabilities (and your site then appears to be hosting malicious images).
If you care about people uploading profile images that are inappropriate then you will need active curation of some kind.
The Gravatar service specializes in hosting profile avatar images and has a Terms of Service squad to "police" avatar content.
http://gravatar.com
By using the user's avatar url in your code you're actually making all your visitors visit that user's site as well. The user will be able to track who looks at the image and when.
This is pretty much how analytic tools works. By requesting a resource from a third party site, the third party can track your users.

Is it possible to access web viewer content in Filemaker Pro?

I am developing Filemaker application that uses web viewer.
I need to access to DOM or Window object inside web viewer control so that I can send some messages(or trigger predefined events) to web page from Filemaker.
So the goal is to make web page inside web viewer control get some data that Filemaker sends at any time. Web page is a local html file of which URL starts with file:///.
Is it possible to do this or is there another way to accomplish this task?
It's much easier to send a message from the web viewer to FileMaker using the fmp url protocol (which you can use to e.g. call a script in FileMaker from Javascript).
You can't send a message directly to the web viewer from FileMaker. Your best bet is to set a variable on a service somewhere and have the web viewer poll that service to see if the value changes.
"This task" is not well-defined, IMHO. What exactly are "messages" or "predefined events"? You certainly can use the Set Web Viewer script step to make the web viewer load another URL at any time you wish to.
Note also that you can use Data URI to load data into the web-viewer directly, without requiring an external HTML document.

To hide the path and url of videos on my website

just I want to know that I am preparing one website regarding videos. I want to upload on my server or third party's server but I do not want to show the path of the video .. Is it possible..?
Not really. The source of the stream will always be known by the client - the client can't receive from a black hole.
Using Flash you could try to hide it, but only from non-technical users. If you're trying to protect the IP of the source, you might look into a proxy solution.

Authentication with Box on iPad

I'm adding Box support to an iPad app. I tried the official SDK and I don't want to use it for the following reasons:
Login page is too wide for a modal controller with UIModalPresentationFormSheet style on iPad. The SDK hosts UIWebView which loads content of https://m.box.net/api/1.0/auth/, which perhaps returns HTML with min width set to 768px (although I didn't check the HTML, speculating here).
HTML in login page doesn't show Google Apps authentication option. The full desktop version of the page does.
Because the login page is hosted in UIWebView the user cannot be sure that he's supplying the credentials to Box, and not to an app author.
I don't need the whole SDK functionality, just authentication, folder/file listing and content download. Since my app also uses other cloud storage providers I'd prefer to provide uniform file browsing experience.
Here's what I'm going to do:
Add a custom URL scheme for my app, let's say "myapp".
In Box's Application settings for my app set Redirect URL to myapp://RedirFromBoxAuth.
When the user chooses to browse Box from inside my app, I'm going to:
Get a ticket by calling GET https://www.box.com/api/1.0/rest?action=get_ticket&api_key={API_KEY}
Extract the ticket, then call openUrl with https://www.box.com/api/1.0/auth/{TICKET} This will open Safari and let the user enter his credentials. This is the full, desktop version of the login page.
On successful login Box's server will tell Safari to redirect to myapp://RedirFromBoxAuth?ticket={TICKET}&auth_token={TOKEN}, which in turn will tell iOS to yield control to my app.
My app receives handleOpenURL notification and I can extract the authentication token and use REST API from now on.
Please comment, is it a good plan? I created a quick prototype and it seems to work, but maybe I'm missing something?
Box team, could you please tell us will an app using this authentication model be eligible for inclusion in OneCloud?
This seems like a good strategy and will probably make for a better UX/easier implementation than the normal redirect. Please let us know if you run into any weird edge cases by implementing it this way.