DBServer/app/models/page.rb
#### updates files system with conversion results and updates database status
updates files system with conversion results and updates database status
updates files system with conversion results and updates database status
def update_conversion(result_jpg, result_sjpg, result_orginal, result_txt)
    self.save_file(result_sjpg, :s_jpg) unless result_sjpg.nil? 
    self.save_file(result_jpg, :jpg) unless result_jpg.nil? 
    self.save_file(result_orginal, :org) unless result_orginal.nil?
    self.status=Page::UPLOADED_PROCESSED
    if self.short_mime_type==:JPG then
     self.mime_type=PAGE_DEFAULT_SCAN_MIME_TYPE
    end
    if result_sjpg.nil? then
      self.preview= Page::PAGE_NO_PREVIEW
    else
      self.preview= Page::PAGE_PREVIEW
    end
    self.content=result_txt
    self.save!
  end
def update_conversion ( result_jpg , result_sjpg , result_orginal , result_txt ) self . save_file ( result_sjpg , :s_jpg ) unless result_sjpg . nil? self . save_file ( result_jpg , :jpg ) unless result_jpg . nil? self . save_file ( result_orginal , :org ) unless result_orginal . nil? self . status = Page :: UPLOADED_PROCESSED if self . short_mime_type == :JPG then self . mime_type = PAGE_DEFAULT_SCAN_MIME_TYPE end if result_sjpg . nil? then self . preview = Page :: PAGE_NO_PREVIEW else self . preview = Page :: PAGE_PREVIEW end self . content = result_txt self . save! end
updates files system with conversion results and updates database status
updates files system with conversion results and updates database status
# small preview pic # medium preview pic ### pages scanned as JPG are converted to PDF
result_jpg
<not_specific>
result_sjpg
<not_specific>
result_orginal
<not_specific>
result_txt
<not_specific>