$echo '{
< "pathToImageUrls": "images",
< "fileNameFunction": "({url, md5}) => md5(url)",
< "uploadTo": "zip-file",
< "preDownloadFunction": "/* Example: We get rid of the items with price 0\\n({ data }) => data.filter((item) => item.price > 0)\\n*/",
< "postDownloadFunction": "/* Example: We remove items without any successfully uploaded images.\\n We also remove any image URLs that were not uploaded\\n \\n ({ data, state }) => {\\n return data.reduce((newData, item) => {\\n const downloadedImages = item.images.filter((imageUrl) => {\\n return state[imageUrl] && state[imageUrl].imageUploaded;\\n });\\n \\n if (downloadedImages.length === 0) {\\n return newData;\\n }\\n \\n return newData.concat({ ...item, images: downloadedImages });\\n }, []);\\n}\\n*/",
< "imageCheckType": "content-type",
< "proxyConfiguration": {
< "useApifyProxy": true
< }
<}' |
<apify call lukaskrivka/images-download-upload --silent --output-dataset