Providing a file with a URL

This chapter explains how to provide a file using a URL. When storing DMS objects, provide the URL leading to a file in the contentUri property. Before the DMS object is stored, the DMSApp will download the file via the specified URL (contentUri). The URL must be a relative URL. The respective user’s information is also transmitted in the HTTP request during the download (AuthSessionID). The AuthSessionID can be used to identify the user, e.g. to perform a permission check.

Since the file is downloaded in a request, this procedure is not suited for large files. Use the temporary file upload procedure for larger files. For additional information see Providing a file via temporary upload.

Downloading the provided file

The DMSApp performs an HTTP GET request to the URL specified in the contentUri parameter. Here is an example for the DMSApp ’s HTTP GET request for your source system, provided the contentUri contains the following URL /myapp/sources/mysource/myfile.txt:

Request

GET /myapp/sources/mysource/myfile.txt
Accept: application/octet-stream, */*
AuthSessionID: SampleAuthsessionId

Your source system’s response must look as follows:

Response

HTTP/1.1 200 OK
Content-Length: 3495

<binary content>