SP.Web.getFileByServerRelativeUrl(serverRelativeUrl) Method

SharePoint 2010

Last modified: May 27, 2011

Applies to: SharePoint Foundation 2010

In this article
Return Value
Applies To
Remarks

Returns the file object located at the specified server-relative URL.

var value = SP.Web.getFileByServerRelativeUrl(serverRelativeUrl);

serverRelativeUrl

A string that specifies the server-relative URL for the file.

Type: string

It must not be null. It must not be empty.

Show: