CÀI ĐẶT
BƯỚC 1: Tạo GAS lấy access token với scope drive
Vàohttps://script.new/ tạo project mới với code sau:
Thêm dịch vụ Drive API:



Deploy code trên và copy url của Web Apps
Dạng như thế này https://script.google.com/macros/s/###/exec
BƯỚC 2: Cấu hình
Vào index sửa maxFileSizeAllow, linkGAS, folderId
Vào view sửa lại domainDownload
Về domainDownload thì dùng cái này
Không thích nữa thì sửa lại code dùng fileID của google drive.
Hoặc dùnghttps://drv.tw (Không dùng cho bộ nhớ dùng chung)
OCR là tính năng thêm, hướng dẫn
BƯỚC 1: Tạo GAS lấy access token với scope drive
Vàohttps://script.new/ tạo project mới với code sau:
function doPost () {
// DriveApp.createFile(blob) // This is used for adding the scope of "https://www.googleapis.com/auth/drive".
var token = ScriptApp.getOAuthToken();
return ContentService.createTextOutput(
JSON.stringify(token)
).setMimeType(ContentService.MimeType.JSON);
}
Thêm dịch vụ Drive API:



Deploy code trên và copy url của Web Apps
Dạng như thế này https://script.google.com/macros/s/###/exec
BƯỚC 2: Cấu hình
Vào index sửa maxFileSizeAllow, linkGAS, folderId
Vào view sửa lại domainDownload
Về domainDownload thì dùng cái này
Không thích nữa thì sửa lại code dùng fileID của google drive.
Hoặc dùnghttps://drv.tw (Không dùng cho bộ nhớ dùng chung)
OCR là tính năng thêm, hướng dẫn