Add new file in existing object using REST API

I have an object with some files.
Now I need to remove all files and add new file in that object.
 I can remove files using below Service

"http://localhost/REST/objects/{checkedOutObjectVersion.ObjVer.Type}/{checkedOutObjectVersion.ObjVer.ID}/{checkedOutObjectVersion.ObjVer.Version}/files/{checkedOutObjectVersion.Files[0].ID}.aspx?_method=DELETE"

Now I would like to add new file in that Object.

Upload new file in temp location.

{{url}}/REST/files

Now trying to update in document using below service


{{url}}REST/objects/
{checkedOutObjectVersion.ObjVer.Type}/{checkedOutObjectVersion.ObjVer.ID}/{checkedOutObjectVersion.ObjVer.Version}/files

But getting below response


What is the wrong I am doing

Parents
  • You can execute a POST to M-Files Web Service: Object files, including the new file content in the body as a stream.  The object must be checked out already and must be able to have another file added (e.g. by having the "single file document" property set to false).

  • That object is checked out and I just delete all files and need to update new files.
    Files are uploaded in temp location.
    When I am using UploadID and other details then getting this unnamed value

  • That approach is not supported.  As the documentation I linked to shows; you should push the file to the other endpoint instead.

Reply
  • That approach is not supported.  As the documentation I linked to shows; you should push the file to the other endpoint instead.

Children