ICN 3.0.3 - Change mimetype of files when we double click and download them or right click and download - ibm-content-navigator

In the search result when we double click on the files to open/download them, I want to change the mime type of such files.
Like when I open a file named abc.trns I want to change it's extension to PDF - abc.pdf. The new mime type value is already displayed in a column from where I have to fetch that value (new mimetype value is present in doc property).
Please help in how this can be achieved, I'm very new in ICN plugin development.
If anyone has already developed such plugin please share the source code for reference.
Repository - CMOD 9.5
ICN - version 3.0.3

the plugin development examples are present in the redbook. Please refer those example for the on-click event for download.
Once you get that setup - have the event handler read the metadata (from where you get the extension ) and pass it on to function to convert the data stream into specific format.
Please note the above conversion will require extra jar and dependencies on the type of document you want to convert. Here you have to take into consideration all the extension which comes in from that field.
hope this helps :)

Related

TIA Portal Openness - modify project library types

In TIA Portal Openness (API version 16, 17 or 18) - is there a way to edit library types? That is, to modify a library type and release the change as a new version?
Specifically, I wish to modify PLC User Defined Types (UDTs).
using Openness, I have managed to:
Instantiate a library UDT type in a PLC
Export it as XML (no library type information was included in the export)
Modify the XML file
Import the XML file, but only when the UDT type is not being edited
The PLC UDT is updated according to the changes in the XML file, but it is no longer linked to a library type. However, I wish to make versioned changes as above. Is this possible? If yes, how?

I need to remove the "on page nn" from my DITA-OT 3.6 xrefs

Would someone have fun telling me this easy info? My xrefs have format="dita", my topics have no other attributes. I have looked for two days now and cannot find anything detailed enough to succeed. I am publishing to PDF through the org.dita.pdf2 plugin.
You can search for "on page" in the pdf plugins folder. You should find the language resource file with the respective string. You should then override this string in your plugin. If this os insufficient, search again for the ID of the respective string in the XSL files for the corresponding template and override this in your plugin.

Native file path

I have started a development of a music player. I made some additional kotlin logic to retrieve all audio files meta data on device from the Android as a list of meta data. I'm trying to understand how a native path should look like for just_audio to understand. My current implementation uses a deprecated key - MediaStore.Audio.Media.DATA for contentResolver which returns a path like this /storage/emulated/0/Download/scifri20181123-episode.mp3. Can this path be used by the plugin or I need to find another way to retrieve the path in different format?
The same question is valid for the album art.
Yes, if it's a valid file path, then just_audio will be able to open it. You could pass this into setFilePath:
var filePath = '/storage/emulated/....../foo.mp3';
await player.setFilePath(filePath);
This is a convenience method for:
setAudioSource(AudioSource.uri(Uri.file(filePath)));
where Uri.file(filePath) will create a Uri instance containing something like file:///storage/emulated/..... under the hood.
Note that if your app tries to access any file outside of its own app data/cache directories, it also requires permission to do so, and there are other Flutter packages available to help you with this.
Note also that there is also an existing flutter package using the content resolver API called flutter_audio_query, so if it contains what you need, you might not need to write your own Kotlin code.

Is it possible to index custom documents in Faceted Search (ke_search) ?

My requirement is to index content of documents uploaded by user e.g PDF / DOC etc. Is it possible to index content of these documents by building custom indexers for the Faceted Search extension ke_search? If so, then can anyone provide any guide as to how would I create such indexers?
I am new to Typo3 so any help would be appreciated.
Hello and welcome to TYPO3 - the almost everything is possible CMS :-)
For your own indexeres you will need an own small extension and then register your indexers to the ke_search. Since the customers indexeres are written in PHP, you can use the whole power of PHP. So you just need some PHP libs on your server that are able to read the content of PDF and DOC files and then store the result to the TYPO3 database.
Check the docs:
https://www.typo3-macher.de/facettierte-suche-ke-search/dokumentation/ein-eigener-indexer/
Example configuration with an indexer:
https://github.com/teaminmedias-pluswerk/ke_search_hooks
EDIT: You should also check the build in indexers of ke_search. I guess there is already an indexer for PDF / DOC files included.

How can i browse file without uploading in GXT?

i'm beginner with GXT and i'm wondering if there is a way to parse a file and extract some informations without uploading it.
i created a formpanel that contains an uploadFile form but i don't know waht's next, how to get the complete path of the file so i can read/write with java io or how to retrieve the file or is there an alternatif solution, thank you.
Best Regards.
You can do it in some modern browsers using bleeding edge HTML5 apis for which you would need to use GWT JSNI code. There are no api's from GWT team as is.
HTML5 FileReader
FileReader includes four options for reading a file, asynchronously:
FileReader.readAsBinaryString(Blob|File) - The result property will contain the file/blob's data as a binary string.
FileReader.readAsText(Blob|File, opt_encoding) - The result property will contain the file/blob's data as a text string.
FileReader.readAsDataURL(Blob|File) - The result property will contain the file/blob's data encoded as a data URL.
FileReader.readAsArrayBuffer(Blob|File) - The result property will contain the file/blob's data as an ArrayBuffer object.
Example of GWT wrapper over these -
https://github.com/bradrydzewski/gwt-filesystem
You can read about it more from here - How to retrieve file from GWT FileUpload component?
IMHO you cannot read it .
Due to security reasons javascript(gwt) doesn't have access to the system drives files.
http://en.wikipedia.org/wiki/JavaScript#Security
see Opening a file in local file system in javascript
In order to get the file you need to make a server call.
Instead you can do your validation server side and throw proper messages to user.
P.S : i am not considering modern browser concept.What happens if someone opened in other than so called modern browsers?? Will the programm runs same?? Its always better to do server side validation..