Maximo 5.2 Can upload attachment to the server but can't view them on client side - attachment

Ok I know Maximo 5.2 is horribly outdated but currently I just want to get the attachment working. So here is the situation:
I have an old server (running 2000) with a folder being shared on the network with the name of F$. I have tried that the attachment uploading functionality works fine: users can attach any file to a work order and that file will be copied into a specified folder in the F: drive of the server. But when I try to access to that file from the client side -- that is, click on the link within the work order (from attachment tab in Maximo webapp) in order to view the attachment -- I get a 404 response. So in a way it's like I am able to write to the server but somehow I can't read or download it from the client side.
UPDATE:
I found out that after you've uploaded a file to the server, it can be accessed from the link http://servername:port/doclinks/drawings/filename from any other client side desktop in the browser. However within the Maximo web app, the webpage javascript automatically parse the link as http://servername/f$/MAXIMO/doclinks/drawings/filename -- It returns redundant part and withno port number. Is this returned link configurable through settings or do I have to dig into the JSP?

You need to set up virtual directory mapping on weblogic
http://docs.oracle.com/cd/E11035_01/wls100/webapp/weblogic_xml.html
The files are on the server. You just to correctly map the doclinks root on the file system to make it accessible to the web. You are getting a 404 error because the mapping is wrong.
In c:\maximo\applications\maximo\maximouiweb\webmodule\WEB-INF look for weblogic.xml
Add an entry:
<virtual-directory-mapping>
<local-path>/apps/maximo/</local-path>
<url-pattern>/doclinks/*</url-pattern>
</virtual-directory-mapping>
The entry above sits between <weblogic-web-app> and </weblogic-web-app>
The above example would mean your doclinks directory on the server is /apps/maximo/doclinks/
You would need to edit weblogic.xml, redeploy your maximo.ear along with your doclinks.

Because you are getting http://servername/f$/MAXIMO/doclinks/drawings/filename, particularly the f$/MAXIMO part, it tells me your F<PATH>\\MAXIMO\\doclinks = http://servername:port/doclinks mapping in your doclinks.properties is not correct. If you are on the Maximo host, via remote desktop or whatever, and you open Windows Explorer, what do you need to put in the address bar to access the attached documents folder? You said it's on F$, but F<PATH> in your properties file will translate into F:, not F$. So, you need to change your doclinks.properties
from: F<PATH>\\MAXIMO\\doclinks = http://servername:port/doclinks
to: \\\\servername\\F$\\MAXIMO\\doclinks = http://servername:port/doclinks

Related

WOPI Host implementation, trying to render doc in iframe

I'm trying to get Wopi host implementation in Ruby on Rails application.
My domain is whitelisted under CSPP. Trying to get the file contents in iframe, but I just see "Word Online" and a loading gif, I return binary file contents of docx as response to ..wopi/files/:id/contents. I don't get any calls hitting my host server.
Sample wopi_src_url: https://word-view.officeapps-df.live.com/wv/wordviewerframe.aspx?ui=1033&rs=1033&dchat=false&IsLicensedUser=0&WOPISrc=https://sgdevwopi.test-wopi.sycamoreinformatics.com/wopi/files/31/contents?access_token=eyJhbGciOiJIUzI1NiJ9.eyJ1c2&access_token_ttl=160000000
Able to get the Wopi validation page in Iframe using .wopitest file. How should I proceed further? Or what am I missing? Please help.
Note: I'm using ngrok to make my local app server visible publicly with whitelisted domain.
I see to problems with your URL. You must ensure that
the URL is of the form http://server/<...>/wopi/files/(file_id) (so drop the /contents part - WOPI client will call the /contents endpoint automatically when necessary)
the WOPISrc parameter value is encoded to a URL-safe string
More info here and here.

how can i know the physical path from selected file (fileupload bootstrap)

I´m making a web application in MVC, I have a view where I select a file from my pc directory (like opendialog form in windows applications), bootstrap´s fileupload gets the file name but I want to know his physical path to. Because I want to save it in my data base (where file come from).
Anybody can help me??
Thank you in advance!
You can't, this information is never sent to the server for obvious security reasons. Only the filename is sent to the server. So you cannot store the physical path where the file originated from the client machine on your server.
When you upload a file via a web browser, the actual file path is not supplied. This is seen as being a security feature.
There is no way to circumvent this using pure HTML. Some people get around it by using a plugin such as Flash or Silverlight to upload the file, but I recommend living with this feature if you can.

open an excel file located on the server instead of download it MVC

I'm building a Reporting web application right now with MVC3 and I've come up to a couple problems.
My goal is to have it able to generate and view Crystal Reports, SSRS reports, and Excel documents.
Right now I'm working on the Excel segment and I'm running into more trouble than I thought I would. First off, when I link directly to the file, it either opens inside the browser or it downloads it from the server and if the user makes changes it doesn't actually save it to the true file on the server.
I've tried both linking to the file directly using Razor and a ViewModel with the path to the document as well as directing it to an action that returned a File.
I've also tried linking it to a shortcut to the actual file thinking that if I could open the shortcut it would open the file the way I wanted it to and unfortunately it didn't really open at all.
The users already have access to the files on the server through a network drive, so as of right now they can go into the server, open the excel document, edit and save it no problem. I want to duplicate this effect through a link. The program already has a file browser built, so I can browse between the files and make links to the reports.
Thanks in advance!
Since they are apparently on a network drive, you can just link to the files directly, relative to the user?
For example: a link to file://///SERVERNAME/folder/
I tested it between two computers on the network, and that seems to work. However, you still get a popup asking that you want to do with the file, open or save. (both in firefox and IE)
Note: Yes, that many slashes seem necessary, lol

How To Dynamically Route to Downloads

Basically, this is what my app does:
It sends an AJAX request
The server creates a file
The server sends back the URL of the
file location
The client-side will attempt to
create a dialog to download the file
at that location (probably using a
frame? I haven't got this far yet).
My question is, how do I dynamically route to the files I create so that they are accessible when you browse to them? If I don't add a route for them, then they will get a 404 if they try and access the directory they're in.
The files are currently stored in a folder in public.
Would the best way to deal with this make the folder somehow not require a route, so that it can be browsed to directly, and then have an index page on it so they can't view the full list of files? If so, please let me know how I can accomplish this. And on a side note, if you have an idea of how I can accomplish JS displaying the download dialog let me know.
It's Rails 3 by the way.
Thanks!
For a full private set of files: choose a place for your files outside your public directory, then configure X-SendFile support in your web server and finally use send_file in your rails application.

Open a file that is on a file server from a webpage?

I am working on an internal application. We have a website that displays all our SSRS reports for a group of work. I have been asked to see if I can link all the files (pdf, word, excel) for the group of work. These files are stored on a file server that users viewing the reports have access to. Each group has its own group of reports and shared files.
Is it possible to open the files (without downloading them) from a webpage? Meaning that they file is opened from the file server? I don't want people to download a copy of the file.
I am pretty sure this can work with IE because sharepoint does it. However, other browsers may have an issue.
EDIT: What I would like is to have a web page with links to the files. When they click on a link (say for a word doc), word will open the file that resides on the file server. Without out a local copy downloaded from the network share.
EDIT2: Please note, I know what I am asking is probably not possible in all browsers. I am more or less just making sure. It seems possible in IE using activeX, but out side of that browsers do a good job at keeping processes inside a sandbox.
3 options. Remember this is for an internal website.
link to the share using file://. This will have the side affect of downloading the file to be viewed. As long as user clicks open every time it should not be a big deal.
Use JavaScript and activeX to open word (excel, reader, ect) passing in the file path as a command line arguments. This works only in IE and in win7 (probably vista) user will get a pop up asking if it is ok for the activeX control to run.
Create a new protocol. openfile://. This would be set up to run an application that is installed on the client machine which would open the file. Since it is internal, the application could be installed on the machines without issues. This also requires a registry change.
I haven't picked one as this change is still being looked into but i figure I would update this in case someone runs into something similar.

Resources