Etag field in oc_filecache table, what it means?

Hi

I need to upload files directly to the nc repo, usually after that a files:scan … would add the needed registers to oc_filecache with the new files uploaded but since occ files:scan is soooooo slow I want to insert the data for the new file directly in oc_filecache.

I’ve all the fields located and test the function and works ok and fast but I can’t find the meaning of “etag” and I guess that field could be important. How could I get the right value of that field to make a direct insert in the oc_filecache table?

I know that the preferred method is occ files:scan but --all needs in my case >14 hours. If I scan only the directory which I’m uploading data it needs only a few seconds but since sometimes I need to upload >500 files at same time to different directories it can be >1 hour.

Thks

Please don’t mangle with the database. Besides the fact you could easily brake your system this method is fragile - if there is change on the DB schema you have to adjust the script…

You could try different upload methods e.g. adding the file with curl or using WebDAV - both are official and supported methods. for occ - as long you add multiple files to the same directory you can ran occ once per directory which could improve the speed as well.

1 Like

I know the risks and your’re right that should be better to use a “traditional” method.

cURL was fine but I have an absurd problem, no way to upload or create directories using MKCOL it they have a comma in the name. I’ve tried to replace the comma with %2C, no success.

Do you know how to send a MKCOL to create for example “my,directory”?

Is strange because I though that the problem were the comma in the name, but if I retry it a few times, the command works.

It only occurs with the names with comma (error 405), anyway it seems that with an app password the speed is very reasonable.

Thanks

1 Like