Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ItemUploadOptions not honored #17

Open
leepfrog-ger opened this issue May 9, 2015 · 2 comments
Open

ItemUploadOptions not honored #17

leepfrog-ger opened this issue May 9, 2015 · 2 comments

Comments

@leepfrog-ger
Copy link

When uploading a file and specifing the option to Fail on a name conflict this setting seems to be ignored. The already existing file is silently overwritten.

var opt = new ItemUploadOptions() { NameConflict = NameConflictBehavior.Fail };
var result = await Connection.PutNewFileToParentItemAsync(folder.ItemReference(), "upload2", fStr, opt);
@rgregg
Copy link
Contributor

rgregg commented May 11, 2015

That's true. I didn't get to implementing that in this sample. It should be pretty easy to add support for though, if you want to submit a pull request.

@leepfrog-ger
Copy link
Author

Hi gregg,

thanks for the reply. Unfortunatly I am not that experienced with programming in general so this would probably result in a lot of try and error and spaghetti code ;)

Regarding the actual issue: I know that this is just a PoC/demo but as this repository is linked on the official microsoft api homepage I think it would be better to throw a NotImplemented Exception or something like this for an operation that seems to be implemented but is not as this would result in data loss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants