You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python: 3.11
Office365-REST-Python-Client Version: 2.5.2 vs 2.3.14
In earlier versions (e.g. 2.3.14), the copyto method of a File instance expected a target url including a filename which made it possible to copy file into a folder whithout overwriting another file with the same filename.
Now (version 2.5.2), the method only expects a folder url, and there is (apparently) no possibilty to pass a new filename (at least I dit not find any other way than to rename the file after copying; however, this does not work if there is already a file with the same original filename).
So my main question is: is this change intended?
And if it is, is there a workaround without overwriting other files?
I could not pinpoint which version changed the behaviour of the copyto method, but it has to be somewhere between 2.3.14 and 2.5.2.
In the new version it is much easier to retrieve the File instance with a working copyto method, however I think the way the copyto method worked in the old version is much more useful.
The text was updated successfully, but these errors were encountered:
i confirm the change was intended although it indeed broke backward compatibility, apology about that. The intention was to more easily address a file and folder and pass it as a parameter into a specified method.
In terms of filename parameter, a new 2.5.3 version introduces a support for it in File.copyto and File.copyto_using_path methods as demonstrated below:
Python: 3.11
Office365-REST-Python-Client Version: 2.5.2 vs 2.3.14
In earlier versions (e.g. 2.3.14), the copyto method of a File instance expected a target url including a filename which made it possible to copy file into a folder whithout overwriting another file with the same filename.
Now (version 2.5.2), the method only expects a folder url, and there is (apparently) no possibilty to pass a new filename (at least I dit not find any other way than to rename the file after copying; however, this does not work if there is already a file with the same original filename).
So my main question is: is this change intended?
And if it is, is there a workaround without overwriting other files?
I could not pinpoint which version changed the behaviour of the copyto method, but it has to be somewhere between 2.3.14 and 2.5.2.
Code version 2.5.2
Code version 2.3.14
In the new version it is much easier to retrieve the File instance with a working copyto method, however I think the way the copyto method worked in the old version is much more useful.
The text was updated successfully, but these errors were encountered: