Frage

I am using the Box windows V2 SDK to upload files to my Box account using the following code:

BoxFileRequest request = new BoxFileRequest()
{
    Parent = new BoxRequestEntity() { Id = "0" },
    Name = attachment.Name,
    Description = "This is failing to be sent..."
};

client.FilesManager.UploadAsync(request, new MemoryStream(attachment.FileContent)).Result;

Uploading the file works great. However, I can not get the description field sent to the box server. Is it possible to upload a file with a description, or do I have to call FilesManager.UpdateInformationAsync after the file has been uploaded to accomplish this? It would be nice if this was an option so I could reduce the number of API calls..

War es hilfreich?

Lösung

The description must be set in a separate API request after uploading the file.

We have heard reusing some of the request objects may cause some confusion on what can be done with each request. We are evaluating whether or not this should be changed

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top