Changing WordPress Media Link URL?

Hiya folks,

I'm working on high scalability with wordpress.And I know linux file system ext3 have 32k folder issue.
So I can change default upload directory,

For example
When I define this

define( "UPLOADS", "wp-content/blogs.dir" . strrev(chunk_split (strrev(md5($wpdb->blogid)), 2,'/')) . "/files/" );

I get 404 error for media files,but uploading succesfully,How can I fix this error.Probably, will edit some default value but which file?

Is there any suggestion/advice?