我的阵列中有许多pdf(.pdf)文件。需要将所有文件存储到mongo数据库。需要存储在三列中(文件名,上载日期,标志) 那么我该怎么做。 我尝试过:
import pymongo
from pymongo import MongoClient
from gridfs import GridFS
from bson import objectid
client = MongoClient("localhost", 27017)
client = MongoClient()
print(client)
db = client['sampleDB2']
db = MongoClient().mygrid
fs = GridFS(db)
print(fs)
提前谢谢。...