O'Reilly logo

Railo 3 Beginner’s Guide by Mark Drew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - converting the uploaded video

Let's edit the video_upload.cfm file to add the code required to convert this video to an Internet-viewable format.

  1. In the video_upload.cfm file, in our VideoShare folder, add the following lines of code; we will go through what they do in a second:
    <cfscript>
    ...
    VideoObj.setUser(User);
    VideoObj.setUploadedAt(Now());
    EntitySave(VideoObj);
    newName = CreateUUID();
    videoName = newName & ".flv";
    </cfscript>
    <cfvideo action="convert"
    profile="internet"
    source="uploads/#VideoObj.getOriginalFile()#"
    destination="videos/#videoName#">
    <cfscript>
    VideoObj.setFile(newName);
    VideoObj.setConvertedAt(Now());
    VideoObj.setStatus(1);
    EntitySave(VideoObj);
    </cfscript>
    <cf_layout section="Video Uploaded!">
    
  2. In the previous ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required