Home arrow Forum

Remository Forum

 


runitzme

Karma: 0  
My customized bulk add files for remository - 2006/12/23 06:51 Hey, a few days ago i made a custom bulkadd file component for Remository based on Mjaz autopopulate for Docman's code. But I have a few problems, it works perfectly..inserts into the database and everything...but when I try to downlaod it, the download always get cut off before it even starts. When i link it threw the remository's backend, it works...so i was wondering whats wrong and if anyone could help. I checked the database to compare the difference of the two files, but the values except for the name were the same...heres the SQL query of my code..

Code:

          $time date('Y-m-d');         $size number_format(filesize("../downloads/".$file)/1024,2).' Kb';     $title $check;             $title stripExtension$file );             $title getNiceTitle$title );                      $database->setQuery(                     "INSERT INTO aliro_downloads_files (                         sequence,                                          realname,                                         islocal,                                         containerid,                         filesize,                          filedate,                         userid,                                          filetitle,                                     registered,                          submitdate                         )                          VALUES (                          '$one',                         '$file',                         '$one',                          '$catid',                         '$size',                         ' $time',                         '$one',                         '$title',                          '$zero',                         '$time'                         )"                     );

  | | Sorry, you do not currently have permission to write here.
ThaSniper

Karma: 0  
Re:My customized bulk add files for remository - 2008/09/19 18:54 Is that one the only database query needed to insert files on the database?

I don't know, the devs are the best to answer this.
But if there is some dependency, some little flag, or something, inserted on some other table when you do it on the backend, it could cause that.

I'm also searching for some info on this subject. I need to know exactly what querys are performed when you insert a file hosted remotely. And also, where are the thumbnails info stored?

Post edited by: ThaSniper, at: 2008/09/19 19:43
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 101  
Re:My customized bulk add files for remository - 2008/09/21 13:55 It should be possible to add files simply by adding records to the xxx_downloads_files table.

The problem may be that files are stored in the file system with the ID inserted in front of the file extension. The "real" file name in the table does not include the ID number.

But I can't be sure without knowing exactly what has been done. This issue wouldn't affect remote files.
Martin Brampton aka Counterpoint
http://aliro.org
http://black-sheep-research.com
  | | Sorry, you do not currently have permission to write here.

Login

Subscribe to Premium Support

Get priority support for Remository and Glossary, sign up now for a Premium Support monthly subscription:

Your Remository user name

Or purchase a year's support:

Your Remository user name

Recommended SEF

SEF Advance

Who is Online

Remository welcomes guests and visitors

We have 9 guest online