IBM Data Catalog doesn't show preview for connection for Cloudant Database - ibm-data-catalog

I created a connection to Cloudant Service.
When i open the connection asset in catalog, i don't get any preview. Is this expected behaviour?
and why Download and Add to Project are disabled.

You are opening the connection asset directly which doesn't have a preview. You are only able to edit the connection by clicking on the edit link below.
If you created a data asset that uses the cloudant connection (pointing to a cloudant document for instance), you will then be able to preview the asset.
For a connection asset, we do not allow download or preview. You need to be creating a data asset for those operations.

Related

iOS cannot preview RTF from React PWA

We have a React PWA where we initially download RTF-Documents and save them to an indexDB. We use createObjectURL and an a with a.click() to simulate a download when the file is requested by the User.
The mimetype is set to application/rtf in the createObjectURL call.
However, on iOS (with Safari) the default "view" operation shows the following:
This file cannot be previewed
It might be corrupted or of an unknown file format.
The same file works from our "normal" webapp (i.e. file is served from a backend server). I tried to set the headers exactly like our backend server does, but it either doesn't show the "view" Button at all or it shows the error.
Any ideas how to set up the calls, so iOS will show the RTF correctly?

Videos Uploaded with rails ActiveStorage to AWS S3 are downloaded instead of playing when calling (clicking) on the link generated

this is kinda tricky.. let's make this clearer :
I'm using a ruby on rails app as back-end for my mobile application, when i upload a video from my ruby app Dashboard and store it on AWS S3 Storage it works perfectly, and when i retrieve the URL for the video it works as well , the thing when i click it it automatically download the video instead of playing it, i checked the meta data of the object inside my AWS Console it has the ( System defined Content-Type video/mp4 ) but as the attached screenshot show it doesn't recognize it as a video (as type is - as of null )
my response is always as JSON since i use the ruby app for the web services and the dashboard only ( i get the correct response )
PS: the video uploaded manually from the AWS Console plays when u open the link.
this is the difference between the video uploaded using my ruby app and the video uploaded manually which is highlighted in red
Look into how to set S3 Content Disposition with the library you're using. You'll need to probably do this when you're uploading the file, or you might be able to coerce it at request time when generating the link to the asset.

NSURLSession Background File Upload using Bound Streams

History:
I am working on a project for which we need to support:
Background Upload of files using NSURLSession.
The server expects file to be uploaded using Content-Type: multipart/form-data
Previously, I was using NSURLConnection with bound pair of Streams as depicted in this Apple Sample.
Now, I wish to follow similar approach with NSURLSession(Background Session) by using uploadTaskWithStreamedRequest:.
I have written a small stand-alone iOS Sample + a PHP server to validate my concept.
Problem: Everything works if app stays in foreground, but if during upload I press the home key, the upload fails after some time with error:
Domain=NSURLErrorDomain Code=-997 "Lost connection to background transfer service"
Also a little before the upload fails the Write/Producer Stream's NSStreamEventEndEncountered is encountered.
Note: I know the work-around where I can write whole HTTP Post body to a temp file and use NSURLSession's file upload API instead. But above is more appropriate if I can make it work.
Question: Can anyone guess what could be possible reason for the upload getting failed?
Sample Code: I have uploaded the iOS Sample Code + PHP Server Code to drop box. Here is the CODE
Thanks!
You can't upload streamed tasks using Background Configuration. I successfully upload data only in two cases:
Download task with data stored in request body.
Upload task from file. In that case you will not receive response body.

Call WCF service from iOS app

*Background:*I have a "document repository" kind-of app.The iOS app calls a WCF service to download the document as well as to get its metadata(document name,document size,etc).There is also a .Net client used for uploading the documents.When I upload a document,I save it in the "AppDomain.CurrentDomain.BaseDirectory" by creating a separate folder for each document.So,effectively,the document is stored at "C:\inetpub\wwwroot\Foo\bar\document.doc".
*The Problem:*when the iOS app tries to download a document,it returns error 500 "Could not find a part of the path 'C:\inetpub\wwwroot\Foo\bar\document.doc'" However,it returns the metadata for the document(document name,document size,document location,etc.) correctly.
What should I do the make the app download the document?
The error 500 was sending back from the server. So the problem is on server side. Are you sure that the path is correct? The uploaded document is on that directory?

How to add a link to start a file download in a Rails Facebook canvas app

In our Rails app that runs in Facebook canvas, we have a workflow where a logged in user can build a document and then download it.
When the file is ready we show a link to it. This is just a Rails action that renders using send_file in dev or head (with proper NGINX config) in production. This part works fine.
In order to have the file start downloading without opening a new browser tab, we had the link target an empty iframe.
This was working, but a while back, presumably due to a security change by Facebook, our link stopped working. The JavaScript errors show:
Refused to display document because display forbidden by X-Frame-Options.
Users can still open the link in a new tab and it will download the file and a quick fix is to make the link open a new browser tab, but that isn't as good of a user experience.
We tried changing the X-Frame-Options in the headers and/or using meta tags, but this is canvas (running in an iframe), so that just stopped those views from displaying.
I also tried this form solution, but it didn't do anything (I could have been doing it wrong).
Is there any way we can build a button or link that will start the file download without opening a new browser tab?
Do you need to set the target at all? With no target set would it not trigger a file download popup in the browser, but leave the current browser window/tab on the same content?

Resources