Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DocumentService

Implements

Index

Methods

Private GetFormValues

  • GetFormValues(fieldsSchema: IFieldSchema[], data: any): Array<object>

addFileBlob

  • addFileBlob(webUrl: string, listName: string, url: string, content: Blob, progress?: function, shouldOverwrite?: boolean, chunkSize?: number): Promise<FileAddResult>
  • Uploads a file. Not supported for batching

    Parameters

    • webUrl: string

      The absolute Url to the SharePoint site.

    • listName: string

      The name of the list the file will be uploaded to.

    • url: string

      The folder-relative url of the file.

    • content: Blob

      The Blob file content to add

    • Optional progress: function

      A callback function which can be used to track the progress of the upload

        • (data: ChunkedFileUploadProgressData): void
        • Parameters

          • data: ChunkedFileUploadProgressData

          Returns void

    • Optional shouldOverwrite: boolean
    • Optional chunkSize: number

      The size of each file slice, in bytes (default: 10485760)

    Returns Promise<FileAddResult>

    The new File and the raw response.

Private getErrorMessage

  • getErrorMessage(webUrl: string, error: any): string

getFileFromListAsBlob

  • getFileFromListAsBlob(webUrl: string, fileRelativeUrl: string): Promise<Blob>
  • Gets a file by server relative url

    Parameters

    • webUrl: string
    • fileRelativeUrl: string

      The server relative path to the file (including /sites/ if applicable)

    Returns Promise<Blob>

    The new File and the raw response.

updateItem

  • updateItem(webUrl: string, listName: string, stringId: string, fieldsSchema: IFieldSchema[], data: any, newDocumentUpdate?: boolean): Promise<ListItemFormUpdateValue[]>
  • Saves the given data to the specified SharePoint list item.

    Parameters

    • webUrl: string

      The absolute Url to the SharePoint site.

    • listName: string
    • stringId: string

      The UniqueId of the list item to be updated.

    • fieldsSchema: IFieldSchema[]

      The array of field schema for all relevant fields of this list.

    • data: any

      An object containing all the field values to update.

    • Optional newDocumentUpdate: boolean

      true if the list item is a document being updated after upload; otherwise false.

    Returns Promise<ListItemFormUpdateValue[]>

    Promise object represents the updated or erroneous form field values.

Generated using TypeDoc