so the idea is to have cms to be faster for iteration…
say I have csv, with at least one of the field being markdown, and in that markdown exist paths(say they are images), the paths are pointing to local disk in absolute fullpath…
wouldn’t it be great, if the cms import engine to parse that, and automatically import the file(of course validated for extension, etc), generate unique string(say using full absolute disk fullpath as the only feed), mapped into single subfulder(so when csv is reimported, the subfolder can be pruned then regenerated from scratch)…
this will defintely put a strain on the importer, so I suggest to not do it simultanously(even if done using workers), but rather to do it synchronously one by one each files and show the process on the UI…
technical:
- make a
Setfor saving unique file(in this case images) imports, saysetOfFilesor something; - iterate all row;
- check for md field(s);
- check for any file, save the
fullFileNameon thesetOfFiles;
- iterate
setOfFiles;
- generate unique string
generatedNamewith thefullFileNameas the feed;- run bss import images(with cms name prefix) run callback, wait for completion;
- on reimport(importing new csv, pointing to same cms):
- delete all imported files on cms prefixed files first;
- then run the csv import callback;
- when csv import callback is running, just block/debounce incoming csv import request until job is completed;