HOW TO Use .DRF as a target / link - html

I am creating an intranet site at work and would like to link button to files that are in a document management environment (Open Text). I created a .DRF (which is just a reference to the file in the DM). I want the user to be able to click a button and the document to either open or download from the DM. I know I can simply copy the docs and put them in the folder with my pages but that defeats the purpose of the DM.
I know the .DRF works because I can click it and the file opens but when I use it as the target or an href it just opens a page in the browser with the doc #. If any one has any experience with this I would appreciate some pointers.
Here is the code I'm using
<a><form method="get" action="DOCS-94710.DOC.DRF" target="_blank">
<button type="submit">94710</button>
</form></a>
Thanks,
Shannon

I discovered a solution while we were setting up our intranet. Create a repository folder on your intranet, upload your (DM) drf files to your intranet, and hyperlink them internally to your intranet. If you have created them properly, it will know which native app to launch it in and would respect the security settings the way you set them up in DM. This was a game changer and works with both IE and Chrome browsers.

Related

How to show File Saveas Dialog in Blazor Server App

I am new to Blazor and trying to show File Saveas Dialog as shown in following link on a button click.
Save as Image
The requirement is - upon clicking the Saveas button above Saveas dialog should be popped up where user can choose the destination of file and file name.
I have tried "enabling the setting to check the save location in the download settings of the browser" and it works. But we do not want to depend on the Browser settings.
Please add your thoughts on below..
Instead of depending on the browser settings is there any other way to show Saveas dialog?
Are there any open source Nuget packages available to help on this?
NOTE: I am using .NET 6.0 for building my application
Thanks in advance,
Bhargavi Gowri.
I also wanted to bring up a window to save a file in which the user could select a folder. Before that, the system automatically saved to the Downloads folder.
As I understood, there was no such possibility before, but now it is possible thanks to this api: https://caniuse.com/native-filesystem-api.
I found this solution in the answer to this question: https://stackoverflow.com/a/70001920/16740180.
It's worth noting that I use Blazor WebAssembly and not a Blazor Server. And I do not know if it will work for you.
Unfortunately, this doesn't work for mobile devices right now, but it works fine for windows. I hope this helps someone.
This isn't a Blazor thing. In web browsers, files are downloaded from links using <a> tag in HTML using the download attribute. Just create a link to your file:
<a href="path_to_file" download>Save</a>
Save
The path must be on the same server, but blob and data links will work as well.
If you do not suggest a name, the browser will use the original filename (possibly changed to remove symbols the OS doesn't allow in file paths).
https://caniuse.com/download
If you want your link to look like a button, then that's a different issue, and you can google or ask that.

Is there any way to open a local file from a html code in google chrome?

so, i've ben hunting for the answer, and seems like i can't get this to work, i wanted to make so that, i have a browser page already made in html, and when i click a link in there, it opens a chosen folder on the computer, but i don't want it to open on just this computer's path, I wanted to open a folder that is inside the main folder, so that anyone that has the same files as I do, can open it, i tried < a href="File_path">, tried putting < a href="file:///(file path)">, tried like i have in excel ../../'file path', and can't see where is the problem, anyone can help?
Here you need to use a "file" protocol to link a file in the HTML like,
Link
The browser may or may not open the file due to the security setting. You can click the right button and choose "copy link address" and then paste it into the browser.
There are security implications of showing a local file/folder from an website. It may work when the page is held locally but when on a server it will be failing. However definitely not any chosen folder anywhere in your PC.
If you require to achieve such you need custom implementation using a programming language like ASP .NET like shown in this example.
https://stackoverflow.com/a/6047826/684030
You haven't mention much details on what web server you are using. But if it's IIS (Windows) you may consider allowing directory browsing which may allow to show a sub directory under your website.

In Chrome Dev Tools, how do I see where my HTML is saved?

I've updated a site's index.html, but I'm not seeing any updates on the site. I've refreshed, cleared cache, used another device and another browser, but I'm just getting the old site.
I'm worried it's because I've updated the wrong file, and it's actually not using index.html as a homepage. Is this possible? How do I see what page is the home page?
Thanks
In Chrome's Dev Tools (Ctrl+Shift+I), you should be able to see the page's Html under the elements menu. To view the source, you can click on the sources tab or press Ctrl+U. If you are using a website like Github to host your webpage, it might take some time for the index.html to update on the server, so be patient. Just wait a little while and if you can still see the old Html, then make sure you updated the right file. Good luck!
Chrome Dev Tools doesn't update any local files, it only changes the document as-loaded into your browser. Your changes are not saved and they are lost when you reload the page.
Note that Chrome Dev Tools does have a Local Workspace option, which does allow for this functionality, but you have to enable and configure it:
https://developers.google.com/web/tools/setup/setup-workflow
To make a local folder's source files editable in the Sources panel:
Right-click in the left-side panel.
Select Add Folder to Workspace.
Choose location of local folder that you want to map.
Click Allow to give Chrome access to the folder.

The links to .xls files will not work on my intranet site?

I am currently building an asp intranet site.
There are various helpful links that I need to include and some of them happen to be .xls files that are located on a local network within the company.
I link these documents just like I would any word docs (which work fine by the way).
<span>Schedule</span>
The link above works if I simply copy and paste the raw address into my browser (a pop-up window comes up asking me to open the file in Excel). But when I make this a link on the intranet site and try to click on it, nothing happens. I can see the link when I hover over it on the status bar but that's it. It is non-clickable. Anyone have any idea what is causing this and how to fix it?
I should mention that two of these .xls files are password-protected but one of them is simply a read-only file which can be opened by anyone.
I am 100% sure this has nothing to do with css styling because the same thing happens in the current (old) intranet site made by someone else and I use these links on different menu bars as well.
I think you use wrong syntax for shared files, try this:
file:///P:\-Projects-\SCHEDULE.xls
Backslashes are still valid for the path part. Moreover, I'm not sure whether Sharepoint may recognize correctly path to most likely network drive P:.
For me such link to local share works:
file:///\\fs-1\Install\Windows\Servers\DB\MSSQL\SQL2005\en_sql_server_2005_service_pack_4_x64.exe
The solution to this problem is to add the site to the "Trusted Sites" list.
Opening intranet files without the user knowing is considered a secruity threat.
In IE go to Internet Options -> Security -> Trusted Sites then add the site.
http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/after-latest-update-ie-wont-open-network-file/172e4ac3-1c1f-4948-8a3f-c8c344eae06d

opening html from google drive

I have made a page in html5 with css3. It works fine on local (I dont use any server, just doubleclick in the index to open it).
I want to put it in google drive. I have load all the documents needed, but when I try to open the html, I can only see the text (I mean, it is not being executing, I can see just the source code).
Any suggestion?
Not available any more, https://support.google.com/drive/answer/2881970?hl=en
Host web pages with Google Drive
Note: This feature will not be available after August 31, 2016.
I highly recommend https://www.heroku.com/ and https://www.netlify.com/
EDIT: As of August 2016 Google Drive can no longer be used to host static web pages, so this solution no longer works.
Create a new folder in Drive and share it as "Public on the web."
Upload your content files to this folder.
Right click on your folder and click on Details.
Copy Hosting URL and paste it on your browser.(e.g. https://googledrive.com/host/0B716ywBKT84AcHZfMWgtNk5aeXM)
It will launch index.html if it exist in your folder other wise list all files in your folder.
I don't think it is necessary to "host" the content using the way from the accepted answer. It is too complicated for a normal user with limited developing skills.
Google actually has provided hosting feature without using Drive SDK/API, what you need is just few clicks. Check this out:
http://support.google.com/drive/bin/answer.py?hl=en&answer=2881970
It is the same to the answer of user1557669. However, in step 4, the URL is not correct, it is like:
https://drive.google.com/#folders/...
To get the correct host URL. Right click on the html file (you have to finish 1-3 steps first and put the html in the public shared folder), and select "Details" from the context menu. You will find the hosting URL right close to the bottom of the details panel. It should look like:
https://googledrive.com/host/.../abc.html
Then you can share the link to anyone. Happy sharing.
Now you can use
https://sites.google.com
Build internal project hubs, team sites, public-facing websites, and moreā€”all without designer, programmer, or IT help. With the new Google Sites, building websites is easy. Just drag content where you need it.
While drive allows you to edit plain text and HTML files I don't believe they allow the HTML to actually be displayed. I don't think they want people hosting websites from their drive space.
A lot of the solutions offered here do not seem to work anymore. I'm currently on a chromebook and wanted to view an HTML5 banner. This seems impossible now through Google Drive or other apps (as mentioned in previous comments).
The method I ended up using to view the HTML5 was the following:
Open Google Adwords (create a free account if you dont have one)
Click on Ads in the top panel
Click on "+AD" and choose image ad
Choose "upload an ad"
Drag and drop your zip file into the area
Click on Preview
Voila, you will see your HTML5 banners in their full beauty
There may well an easier way, but this way is pretty good too. Hope it helps and worked well for me.
Create a new folder in Drive and share it as "Public on the web."
Upload your HTML, JS & CSS files to this folder.
Open the HTML file & you will see "Preview" button in the toolbar.
Share the URL that looks like www.googledrive.com/host/... from the preview window and anyone can view your web page.
Found method to see your own html file (from here (scroll down to answer from prac): https://productforums.google.com/forum/#!topic/drive/YY_fou2vo0A)
-- use Get Link to get URL with id=... substring
-- put uc instead of open in URL