Python将一个文件夹的文件装载到PostgreSQL数据库BLOB列,并将BLOB列下载到另一个文件夹
import osimport psycopg2dir_path = r'C:/Users/Administrator/PycharmProjects/pythonProject9/DownLoadFiles/'for path in os.scandir(dir_path): if path.is_file(): print(path.name) with open(dir_path+path.name, 'rb') as file: .