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: 57  
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://black-sheep-research.com
http://mamboguru.com
  | | Sorry, you do not currently have permission to write here.

Menu

Budding author?

Could you write about software?  Packt Publishing is looking for authors for its new series of Beginners' Guides.  Take a look at their web site to find out more.

Login Form

Username

Password

Remember me
Password Reminder
No account yet?
Create one

Who is Online

Remository welcomes guests and registered users.

We have 22 guest online