Skip to content

Properties set via AdditionalDataManager on DriveItemUploadableProperties are not serialized in the request body #393

@jasonjoh

Description

@jasonjoh

Repro:

  • Configure your project to use Fiddler so you can capture the request

  • Use code like this:

    DriveItemUploadableProperties upProps = new DriveItemUploadableProperties();
    upProps.name = "vacation.gif";
    upProps.additionalDataManager().put("@microsoft.graph.conflictBehavior", new JsonPrimitive("rename"));
    
    // Create an upload session
    UploadSession uploadSession = graphClient
        .me()
        .drive()
        .root()
        // itemPath like "/Folder/file.txt"
        // does not need to be a path to an existing item
        .itemWithPath(itemPath)
        .createUploadSession(upProps)
        .buildRequest()
        .post();
    
  • Review the request body in Fiddler

Result:

The name property is seralized, but not @microsoft.graph.conflictBehavior.

{"item":{"name":"vacation.gif"}}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions