Tag Info

Hot answers tagged

2

You can get the document link using following line: var url = _spPageContextInfo.webAbsoluteUrl + oListItem.get_item('FileRef');


2

You can deploy apps locally if you have the app package. You upload them into the site catalog and they will be made available to your site collections. You won't be able to utilize apps deployed to the MS store. You would need to contact the vendor directly to see about obtaining an .app package or code your own and deploy them.


1

According to SharePointOnlineCredentials class from SharePoint Online Client Components SDK the expiry date for authentication cookie (SPOIDCRL) should be set to 1 hour The following example demonstrates how to provide SPOIDCRL HTTP header in order to perform request authentication in SharePoint Online/Office 365: var request = ...


1

Yes, you can do it. Virto Bulk Download is using the service for creating archives. . You need to pass several parameters to this service. The url of download service is "/_vti_bin/Virto.FileDownloader.Services/DownloadService/DownloadService.svc/Download/{ListId}/{ViewId}/{archiveName}/{keepFolder}/{fileSize}?items{items}&caml={caml}"; ListId - the ...


1

Sandbox solution runs on its own process. Hence the HttpContext you are using will not work. Write file to response problem


1

Assuming you have the MemoryStream, the below code will bring the Save Dialog so user can choose the path Byte[] byteArray = memoryStream.ToArray(); memoryStream.Flush(); memoryStream.Close(); Response.Clear(); Response.ClearHeaders(); Response.AddHeader("Content-Disposition","attachment; filename=filename.zip"); Response.ContentType = ...


1

Ok, I solved it as follows (inspired by this post) - might be helpful for someone else... The idea is to start from the back, removing more and more tokens between '/' from the path until we find the lowest level site URL, which we then use to instantiate the correct ClientContext for the given folder url. The folder itself can then be referenced using ...


1

Can't give a definite answer without seeing the environment, but I would try, in order: IISReset (could be a simple caching glitch) Clear browser cache (from the F12 menu) Temporarily set the master page back to default and see if the issue recurs. Make a copy of the library and check if it recurs there


1

After a long day, it turned out that for successfully using the Powershell DownloadFile() method, in my environment (SP2013 with ADFS) following two lines did the trick(at least for me). $wc.UseDefaultCredentials = $true $wc.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f") So, the final code looks like, $FilePath = ...


1

Try this $wc = New-Object System.Net.WebClient $wc = New-Object System.Net.Networkcredential(Username, Password) $UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)" $wc.Headers.Add([System.Net.HttpRequestHeader]::UserAgent, $UserAgent);


1

Here is a generic idea Using stsadm -o enumsolutions get all installed solutions on the farm Then for each solution you need to download it using following technique [Enable Powershell] (http://support.microsoft.com/kb/968930) [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Cult ure=neutral, PublicKeyToken=71e9bce111e9429c") ...


1

Thanks for the responses, Actually I came across a remedy in a similar article Referring to tha post answer, in my code I invoked the below javascript OnClientClick event of the LinkButton. function setFormSubmitToFalse() { setTimeout(function () { _spFormOnSubmitCalled = false; }, 3000); return true; }


1

Please look at the EncodedAbsUrl, FileDirRef, and FileRef properties. The one you use depends on your needs but I suspect you'll want EncodedAbsUrl or FileRef. Here is an example of what each returns: EncodedAbsUrl: http://yourserver.com/Pages/home.aspx FileDirRef: /Pages FileRef: /Pages/home.aspx var ctx = new SP.ClientContext(siteUrl); var items = ...


1

That's more a case of LMGTFY - Here's a complete tutorial plus a .wsp to add this function. To get some basic understanding Since you can't download multiple files in one response, you need to package them in a .zip for example. What you have to do is getting the byte[] foreach file and package them together. Then add created .zip to the response to invoke ...


1

SharePoint registers a JavaScript "on submit" handler. In this handler the global variable _spFormOnSubmitCalled is set to true. SharePoint uses this variable to check if a submit was executed and prevents any further submits. Since your "download postback" does not refresh the page this variable remains true. With the effect that that all other buttons stop ...


1

I was trying James' solution but was having problems building the correct URL of the document. To get the URL you can: Open Dev Tools (F12) Open the Network tab Click the download a copy button for the document you want the link for The HTTP GET request URL will appear in the network tab.



Only top voted, non community-wiki answers of a minimum length are eligible