Share via


SP.FileCollection.getByUrl Method (sp.js)

Get the file at the specified URL.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

SP.FileCollection.getByUrl(url)

Parameters

  • url

Return value

SP.File

REST resource endpoint

See FileCollection resource for more information.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/folders/getbyurl(folderrelativeurl)/files/getByUrl(url)

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/web/folders/getbyurl(folderrelativeurl)/files/getByUrl(url)

Resource parameters

  • url