Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Upload a file then delete this file ,Error 412 #108

Open
zhongguodaduan opened this issue Jun 22, 2017 · 0 comments
Open

Upload a file then delete this file ,Error 412 #108

zhongguodaduan opened this issue Jun 22, 2017 · 0 comments

Comments

@zhongguodaduan
Copy link

I use office365 sdk, recently i find a issues, upload a file then delete this file, it's error,but if I re-run the app to delete this file, it's ok.
I remember it work well before.
this is my code:

[[[[[[client getfiles] getById:_id asFolder] getchildren] addItem:item withCallback:^(MSSharePointItem *item, MSODataException *e) {
                                        
										__block NSString* _id = item.id;
                                        
										[[(MSODataMediaEntityFetcher *)[[[[client getfiles] getById:_id] asFile] addCustomHeaderWithName:@"If-Match" andValue:@"*"] putContent:body withCallback:^(NSInteger result, NSError *error) {
											[[[[[client getfiles] getById:_id] asFile] read:^(MSSharePointFile *file, MSODataException *error) {    
                                                    [[[[[client getfiles] getById:[path lastPathComponent]] addCustomHeaderWithName:@"If-Match" andValue:@"*"] deleteItem:^(int status, NSError *error) {
                                                    	NSLog(@"error %@",[error description]);
                                                    }] resume];
                                                    
											}] resume];
										}] resume];
									}]resume];

this is the error message:

error = Error Domain=Error in the Request Code=412 "(null)" UserInfo={error={
code = "-1, Microsoft.SharePoint.Client.ClientServiceException";
message = "\U8bf7\U6c42 ETag \U503c\U201c"{773C002E-73B3-4945-86DD-8C0E5B4FACA0},2"\U201d\U4e0e\U5bf9\U8c61\U7684 ETag \U503c\U201c"{773C002E-73B3-4945-86DD-8C0E5B4FACA0},2"\U201d\U4e0d\U5339\U914d\U3002";
}}

Anyone can help me?
Thanks.

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

No branches or pull requests

1 participant