cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

REST API, Upload file, Stage2, contentInfos empty

NC_10068031
5-Regular Member

REST API, Upload file, Stage2, contentInfos empty

Hi,

I try to upload a file, stage 1 is ok, but stage 2 return an empty json like this;

 

{
    "contentInfos":[]
}

 

My code in C# is this;

NC_10068031_0-1659467558359.png

Maybe the way i get the stream of the file is not the correct or the content type.

 

Help on this is appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
NC_10068031
5-Regular Member
(To:NC_10068031)

Just for the record, I made some changes in my code and then now I get a correct answer;

NC_10068031_0-1660255909312.png

 

View solution in original post

3 REPLIES 3

lstStreamIds should by StreamIds+FileNames+StreamIds. And I'm not sure about the rest because I'm not familiar with C#.

NC_10068031
5-Regular Member
(To:jukka)

You're right, but actually my fileNames and StreamsIds have the same value;

NC_10068031_0-1659471813348.png

 

An additional information, the request directly in Postman execute correctly;

 

NC_10068031_1-1659472067815.png

 

 

NC_10068031
5-Regular Member
(To:NC_10068031)

Just for the record, I made some changes in my code and then now I get a correct answer;

NC_10068031_0-1660255909312.png

 

Top Tags