Skip Navigation
Expand
Passing file name in Set file method of Core API
Answer ID 9260   |   Last Review Date 12/24/2018

How do we pass filename in Set file property method of Core API?

Environment:

Applies to all Oracle Field Service (OFS) versions

Issue:

We are using Set file property method of Core API (REST API) to add files to activities.

We don't know how to specify the filename, with extension, while calling the Set file property method. This makes the file appear in Core Manage / Mobility UI without a relevant name, creating confusion.

Resolution:

You can make use of the HTTP header parameter Content-Disposition.

Please add this parameter as: Content-Disposition: attachment; filename="filename.extension", where filename.extension is the file you are passing in the body of the request.

For further information regarding Set file property method, please read documentation here: Set file property method.