Sha256: 1b1c34396cab3e0d95fa75c7cc554c34240004d8774f1708ae0a8d27d564fe03
Contents?: true
Size: 799 Bytes
Versions: 5
Compression:
Stored size: 799 Bytes
Contents
# this code is to attach a photo from the tmp directory def attachtmpmoviepicture if @a_moviefilename $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 @listpicturesfromtmp = "Picture attached" FileUtils.cp(newmoviepictureName , $rwdmovies_directory) else @listpicturesfromtmp = "attachment failed" end rescue @listpicturesfromtmp = "attachment failed" end end end
Version data entries
5 entries across 5 versions & 1 rubygems