LetoDMS Community Forum
upload document more than 32000. - Printable Version

+- LetoDMS Community Forum (https://community.letodms.com)
+-- Forum: LetoDMS Support (https://community.letodms.com/forumdisplay.php?fid=4)
+--- Forum: Technical Support (https://community.letodms.com/forumdisplay.php?fid=10)
+--- Thread: upload document more than 32000. (/showthread.php?tid=406)



upload document more than 32000. - itsu - 12-02-2011

Hi

I tested with Ver. 3.2.1 and It's data dir stopped at 31998.
Are ther any way to increase maximum document number?

I edit maxDirID in the setting config. But It desn't work.


RE: upload document more than 32000. - steinm - 12-02-2011

(12-02-2011, 03:25 PM)itsu Wrote: Hi

I tested with Ver. 3.2.1 and It's data dir stopped at 31998.
Are ther any way to increase maximum document number?

I edit maxDirID in the setting config. But It desn't work.

maxDirID has no meaning. I should delete it at some time.
The number of documents is restricted by the number of directories
per directory of your filesystem. ext3 has a limit of 31998 directories.
ext4 allows 64000.

Uwe


RE: upload document more than 32000. - itsu - 12-05-2011

Hi Uwe
Thanks for your reply.
Are ther any way to extend max documents without changing my file system?
Just making different directory?


RE: upload document more than 32000. - steinm - 12-05-2011

(12-05-2011, 10:06 AM)itsu Wrote: Hi Uwe
Thanks for your reply.
Are ther any way to extend max documents without changing my file system?
Just making different directory?

Setting up a second directory doesn't help, because you won't see the documents in the initial directory anymore. I know this is very unsatisfactory, but there is currently no way out. I have to check first how to solve this without breaking to much.

Uwe


RE: upload document more than 32000. - itsu - 12-05-2011

Hi Uwe

Thanks.
I hope you to support more than 31998 in the short term.

>I have to check first how to solve this without breaking to much.



RE: upload document more than 32000. - itsu - 12-05-2011

Hi Uwe

I had to input more than 32000.
So I changed getpath() and getDir() in inc.ClassDocument.php like followings.
This support more than 20000*31998 documents.
but supporting lots of document, I also had to change ViewFolder.php.

// function getPath() { return $this->_document->getID() .'/'. $this->_version . $this->_fileType; }
function getPath() { return $this->_document->getDir() .'/'. $this->_version . $this->_fileType; }


function getDir() { /* {{{ */
if($this->_id > 20000){
$dirid = (int)( $this->_id / 20000 ) + 1;
}else{
$dirid = 1;
}
return $dirid."/".$this->_id."/";
} /* }}} */


RE: upload document more than 32000. - steinm - 12-05-2011

(12-05-2011, 06:47 PM)itsu Wrote: Hi Uwe

I had to input more than 32000.
So I changed getpath() and getDir() in inc.ClassDocument.php like followings.
This support more than 20000*31998 documents.
but supporting lots of document, I also had to change ViewFolder.php.

// function getPath() { return $this->_document->getID() .'/'. $this->_version . $this->_fileType; }
function getPath() { return $this->_document->getDir() .'/'. $this->_version . $this->_fileType; }


function getDir() { /* {{{ */
if($this->_id > 20000){
$dirid = (int)( $this->_id / 20000 ) + 1;
}else{
$dirid = 1;
}
return $dirid."/".$this->_id."/";
} /* }}} */

That is the approach I had in mind as well. Why do you allow only 20000 documents (dirs) per content subdirectory? You don't need the if() statement because '(int)( $this->_id / 20000 ) + 1' returns 1 for id < 20000 anyway.

Uwe


RE: upload document more than 32000. - itsu - 12-06-2011

(12-05-2011, 07:12 PM)steinm Wrote:
(12-05-2011, 06:47 PM)itsu Wrote: Hi Uwe

I had to input more than 32000.
So I changed getpath() and getDir() in inc.ClassDocument.php like followings.
This support more than 20000*31998 documents.
but supporting lots of document, I also had to change ViewFolder.php.

// function getPath() { return $this->_document->getID() .'/'. $this->_version . $this->_fileType; }
function getPath() { return $this->_document->getDir() .'/'. $this->_version . $this->_fileType; }


function getDir() { /* {{{ */
if($this->_id > 20000){
$dirid = (int)( $this->_id / 20000 ) + 1;
}else{
$dirid = 1;
}
return $dirid."/".$this->_id."/";
} /* }}} */

That is the approach I had in mind as well. Why do you allow only 20000 documents (dirs) per content subdirectory? You don't need the if() statement because '(int)( $this->_id / 20000 ) + 1' returns 1 for id < 20000 anyway.

Uwe

Hi Uwe

I see. I don't need if.
I use this instead. thanks.
I don't have reason to use 20000 you can change it to 31998 or around 30000.
function getDir() { /* {{{ */
$dirid = (int)( $this->_id / 20000 ) + 1;
return $dirid."/".$this->_id."/";
} /* }}} */