Sha256: 60cf9c5076d6b2f899cc7e64298d365b26f3b8d9b30b2477d6b68bdae379186a
Contents?: true
Size: 749 Bytes
Versions: 8
Compression:
Stored size: 749 Bytes
Contents
# this code is to attach a photo from the tmp directory def attachtmpcontactphoto if @a_viewnamedata $currentnametext = @a_viewnamedata end if $currentnametext tmpcontactphotoName = $tmpphoto_directory + "/" + @a_tmpphotoname begin if File.exist?(tmpcontactphotoName) newcontactphotoName = $tmpphoto_directory + "/" + $currentnametext + ".jpg" if ! (tmpcontactphotoName == newcontactphotoName ) File.rename(tmpcontactphotoName, newcontactphotoName) end @listphotosfromtmp = "Photo attached" FileUtils.cp(newcontactphotoName , $addressfiles_directory) else @listphotosfromtmp = "attachment failed" end rescue @listphotosfromtmp = "attachment failed" end end end
Version data entries
8 entries across 8 versions & 1 rubygems