@@ -26,7 +26,7 @@ class File extends SecurableObject
26
26
public function deleteObject (){
27
27
$ qry = new DeleteEntityQuery ($ this );
28
28
$ this ->getContext ()->addQuery ($ qry );
29
- // $this->removeFromParentCollection();
29
+ $ this ->removeFromParentCollection ();
30
30
}
31
31
32
32
/**
@@ -164,7 +164,8 @@ public static function openBinary(ClientRuntimeContext $ctx, $serverRelativeUrl)
164
164
$ serverRelativeUrl = rawurlencode ($ serverRelativeUrl );
165
165
$ url = $ ctx ->getServiceRootUrl () . "web/getfilebyserverrelativeurl(' $ serverRelativeUrl')/ \$value " ;
166
166
$ options = new RequestOptions ($ url );
167
- $ data = $ ctx ->executeQueryDirect ($ options , true );
167
+ $ options ->TransferEncodingChunkedAllowed = true ;
168
+ $ data = $ ctx ->executeQueryDirect ($ options );
168
169
return $ data ;
169
170
}
170
171
@@ -187,7 +188,8 @@ public static function saveBinary(ClientRuntimeContext $ctx, $serverRelativeUrl,
187
188
if ($ ctx instanceof ClientContext) {
188
189
$ ctx ->ensureFormDigest ($ request );
189
190
}
190
- $ ctx ->executeQueryDirect ($ request , true );
191
+ $ request ->TransferEncodingChunkedAllowed = true ;
192
+ $ ctx ->executeQueryDirect ($ request );
191
193
}
192
194
193
195
@@ -216,7 +218,8 @@ public function getLimitedWebPartManager($scope)
216
218
public function getInformationRightsManagementSettings ()
217
219
{
218
220
if (!$ this ->isPropertyAvailable ('InformationRightsManagementSettings ' )) {
219
- $ this ->setProperty ("InformationRightsManagementSettings " , new InformationRightsManagementSettings ($ this ->getContext (), $ this ->getResourcePath (), "InformationRightsManagementSettings " ));
221
+ $ this ->setProperty ("InformationRightsManagementSettings " ,
222
+ new InformationRightsManagementSettings ());
220
223
}
221
224
return $ this ->getProperty ("InformationRightsManagementSettings " );
222
225
}
@@ -229,7 +232,9 @@ public function getInformationRightsManagementSettings()
229
232
public function getVersions ()
230
233
{
231
234
if (!$ this ->isPropertyAvailable ('Versions ' )) {
232
- $ this ->setProperty ("Versions " , new FileVersionCollection ($ this ->getContext (), $ this ->getResourcePath (), "Versions " ));
235
+ $ this ->setProperty ("Versions " ,
236
+ new FileVersionCollection ($ this ->getContext (),
237
+ new ResourcePathEntity ($ this ->getContext (), $ this ->getResourcePath (), "Versions " )));
233
238
}
234
239
return $ this ->getProperty ("Versions " );
235
240
}
0 commit comments