can someone pls help me on this
i tried to do it this way
–in (Image) column of excel sheet from (data import tool) i pasted the Hyperlink* of image for that particular item, i did this for tens of items and as expected everything got imported except IMAGE, now i am doing this ONE by ONE…
Hyperlink* - C:\Users\rana_saheb\Desktop\My products\Stationery\Doms\DOMS_X1_Pencil_Kit.jpg
Muzzy
July 21, 2021, 5:39pm
2
Are you trying to set image to Items? If yes then try this script. Image file name should match item name. Images should be uploaded vif ERPNext file upload not from backend which doesn’t set image url.
image_script.py
import frappe
def execute():
files = frappe.get_all(
"File",
filters={"is_folder": 0},
fields=["name", "file_name", "file_url"],
)
for file in files:
fname, fext = file.get("file_name").split(".")
This file has been truncated. show original
But i want a solution for Fcloud Hosting not Local Hosting and i am using Windows 10 btw tnx
Ok.
So I figured it out myself, after a timely hint from @revant_one .
I started with a File Manager like this …
[FilesHome]
… an Attachments subsection like this …
[FilesAttachments]
… a Sales Invoice like this …
[ACC-SINV-2020-00001]
… and files directories looking like this …
private
├── backups
└── files
├── UOM.csv
└── docType_Chart_of_Accounts_Importer.csv
public
└── files
I execute this script …
# sudo apt install jq;
export PRTCL="http";
export HOST="your.host";
…
Use ReST API to set images in local pytht script that runs on your windows laptop.
You may have to check the rate limit from frappecloud
1 Like
how to run this script base on naming series 0001 to upload to image 0001.jpg and so on.
10k image to be upload ty
Muzzy
December 12, 2024, 7:09pm
6
@miso.reynaldoartuz The code was built to set image to an item. Hence the image name and item name was kept same.
the script was made by @iRaySpace . Not sure if he is still around the forum. Maybe he can assist if you engage him on paid basis.