cancel
Showing results for 
Search instead for 
Did you mean: 

WebScript File Update and MimeType

zafarale
Champ in-the-making
Champ in-the-making
Hi Guys,
        Following piece of code updates existing file new properties but <strong>mimetype</strong>, any suggestions will be appreciated.
Need it ASAP. Deadline

                        var file = ${find from repo}
                        file.ensureVersioningEnabled(true, true);
                        file = file.checkoutForUpload();

         file.properties.content.write(content, false, true);
         file.properties.content.setEncoding("UTF-8");
         file.properties.title = title;
         file.properties.description = description;

         file.properties.content.guessMimetype(filename);
                        file.save();
                        file = file.checkin("Item Updated by "+person.properties.userName);
                        extractMetadata(file);

1 REPLY 1

zafarale
Champ in-the-making
Champ in-the-making
file.properties.content.write(content, <strong>true</strong>, true);