You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

What should the type of the primary file be for /documents/api/1.2/files/data request?

Question
18
Views
0
Comments
edited May 9, 2018 7:00AM in Integration

Summary

What should the type of the primary file be for /documents/api/1.2/files/data request?

Content

Hi All,

We are trying to make a ajax POST call to /documents/api/1.2/files/data rest end point.

Here what should be the input for the primaryFile parameter.

  Tried setting the primaryFile to File, Blob but nothing worked.

  var file = new File([image], 'myImage', {type: image/png}); // Here image is the response from a GET call whose return type is a arraybuffer. Tried blob as well.

   The same call via servlet works fine but via ajax call in my javascript it fails.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!