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?

0

You would need to create a custom solution, sandbox or farm, that can act like a proxy. This would have to happen in the server code, C#, I don't think it's possible with JavaScript. Basically, on click of the link, you would send the user to your own custom ASPX page (located in the _layouts) and that page's code would then go to the real URL, grab the doc/image, load it into memory and serve it to your user. Then the URL would be your custom page, not the actual source.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.