0

I have a site in sharepoint, I have created custom webpart which will display all document library's document links.I have hide the path of the document on hover of link.the problem is that all types of documents are download on click of link and don;t show the url of document but Image and text files are download but it is open in browser itself and shows the path of Document library.

So, my question is that is there any way that Image and text files are to be download on link and not shows the url of that?

1 Answers1

0

If you have full control on the webpart you should be able to force open the images and text file in a new window by javascript with no menu and location bar. Similarly, you can use javascript to force download images and text. You can find the examples here:

Force Download an Image Using Javascript (stackoverflow)

Community
  • 1
  • 1