Skip to main content
  Wednesday, March 08 2023
  6 Replies
  133 Visits
  Subscribe
Hello,
we have an existing documents Reserved Area with about 20.000 documents and 30 users. Every document is connected to one or more single users and/or user groups that are allowed to view the document. Everything is stored in a quite simple relational DB. Do you think we can manage to import these data and relations by understanding the destination data architecture? I am obviously preparaed to do the necessary manual modifications to the data source and then directly inject the data in the WP DB.

Thanks
A
1 year ago
Hi,

Thanks for contacting us here about this extension.

we have an existing documents Reserved Area with about 20.000 documents and 30 users. Every document is connected to one or more single users and/or user groups that are allowed to view the document. Everything is stored in a quite simple relational DB. Do you think we can manage to import these data and relations by understanding the destination data architecture? I am obviously preparaed to do the necessary manual modifications to the data source and then directly inject the data in the WP DB.


Your data is quite large, so it's painful to set manually for single files, even for categories in another way.
Firstly, I'm not sure how many categories containing those files you have on your current site.
However, you can import to WP File Download using Import Server Folder feature.

You can go to this link below for more information:

https://www.joomunited.com/wordpress-documentation/wp-file-download/227-wp-file-download-configuration#toc-import-server-folders

Secondly, in order to restrict 30 users, it's easier to manage them in group users,
then you can restrict them to view categories on frontend using Visibility option.

Please go here for more details:

https://www.joomunited.com/wordpress-documentation/wp-file-download/666-file-access-and-management-limitation#toc-file-access-and-visibility-2

Cheers,
T
1 year ago
Hello, thank you for your reply.

However this would not solve our needs. We do have some documents' categories but this is not how the users need to be able to see or not see documents. Every user is able to see his own documents in every category. In our case categories are only needed for organization, not for view permission.

Example:

CATEGORY INVOICES
inv1
inv2
inv3

CATAGORY ORDERS
ord1
ord2
ord3

USERS
user1
user2

In our system we have for instance:
user1 that is enabled to view inv1, ord1 and ord2
user2 that is enabled to view inv2, inv3 and ord3

As I wrote we are aiming at migrating the existing data and users/documents permissions. I am sure and I do understand that this cannot be achieved by standard import procedures and I will need to work on my source data in order to "inject" them in the database. What I need to understand is how is the data structure in the db of your plugin in order to verufy if it will be somehow possible to work on my data to make them work. Even if it takes me a day of work to modify my source data to map them the right way, it will always be better then having to manually re-assign 20.000 documents.
A
1 year ago
Hi,

Thanks for getting back to me with more information.

I apologize, but it is not feasible to automatically assign user roles for a thousand files in your situation.

Cheers,
T
1 year ago
Hello,

probably you did not understand how far I am willing to go in order to achieve my intended result. I never asked for automatic assigning of users to files. I am not a newbie and I do understand that there cannot be any automatic procedure. I was just trying to understand how is the db structure created for files' permissions in your plugin. However, trusting that I could find a way I did purchase the plugin and I investigated the DB structure by myself. I am confident I will be able to make it work. It is just a matter of importing all the files, exporting the resulting DB, match my existing DB by file names and then replacing all "canview";s:0:"" with the correct users' IDs. I simplified the process to explain what I want to do, of course I also need to match old DB users' IDs with the new ones, however it is possible to do that and in this way I should be able to migrate to your plugin succesfully. It is not straight forward, however the only way possible to migrate a system with so many files already in it.

Cheers!
A
1 year ago
Hi,

Thanks for your response.

User permission information of a file is stored in the"post_meta" table together other file meta information, and it's encrypted.
Here is an example value:
a:14:{s:3:"ext";s:3:"pdf";s:4:"size";i:214919;s:4:"hits";i:0;s:7:"version";s:0:"";s:4:"file";s:17:"63f8375c66837.pdf";s:10:"remote_url";b:0;s:5:"state";s:1:"1";s:9:"file_tags";s:0:"";s:7:"canview";s:1:"3";s:16:"file_custom_icon";s:0:"";s:6:"social";s:1:"0";s:14:"woo_permission";s:0:"";s:19:"file_multi_category";a:1:{i:0;N;}s:23:"file_multi_category_old";s:0:"";}

Cheers,
T
1 year ago
Thank you,

I did find this already by myself as I wrote.

However, now I discovered something that makes your plugin basically unusable for my needs. I did import my 20.000+ files and the system becomes incredibly slow, really impossible to use. It actually blocks the server and if it loads the file list page (Admin) it takes ages.

I stated from the beginning that I had to deal woth over 20.000 files, if this is a limit of the plugin you should have warned me.
  • Page :
  • 1
There are no replies made for this post yet.