Sha256: 1a65612314d546b1dbe179a03ab7eb7a6f678cac0859d78fd489b81180dc52ed

Contents?: true

Size: 814 Bytes

Versions: 1

Compression:

Stored size: 814 Bytes

Contents

 # this code is to attach a photo from the tmp directory
 def attachtmpmoviepicture
  if ! @a_moviefilename.empty?
   $currentmovietext = @a_moviefilename
  end
  if $currentmovietext
    tmpmoviepictureName =  $tmpmoviepicture_directory + "/" + @a_tmppicturename
   begin 
   if  File.exist?(tmpmoviepictureName)
    newmoviepictureName =  $tmpmoviepicture_directory + "/" + $currentmovietext + ".jpg"
     if ! (tmpmoviepictureName == newmoviepictureName )
      File.rename(tmpmoviepictureName, newmoviepictureName)
     end
     FileUtils.cp(newmoviepictureName , $rwdmovies_directory) 
    @listpicturesfromtmp = "Picture attached"
    
   else 
    @listpicturesfromtmp = "attachment failed"
   end
    rescue
   @listpicturesfromtmp = "attachment failed"
   end       
   end
  end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rwdmovies-0.93 code/superant.com.rwdmovies/attachtmpmoviepicture.rb