AnsweredAssumed Answered

WebScript File Update and MimeType

Question asked by zafarale on May 21, 2014
Latest reply on May 21, 2014 by zafarale
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);

Outcomes