AnsweredAssumed Answered

javascript 'rename' - API bug?

Question asked by friedman30 on Aug 13, 2007
hi,

i'm using the javascript API to create a backup copy, change it's name and then resize it (only if it is an image).

i do this:
var backup;
backup = document.copy(currentFolder);
backup.name = backup.name.replace("Copy of ", "backup of ");
backup.save();
backup.transformImage("image/jpeg", "-resize 164");

but still - after i run the transformImage method, i get another copy of the original file.

i checked and found that the value of "backup.name" before and after i change it's name (second line of code) is the same……

why can't i get the "backup.nama" correct value after i change it???
is it a bug in the javascript API??

:?:

thanks,

Dror

Outcomes