// Get the API client and construct the service object. $client = getClient(); $service = new Google_Service_Drive($client); //Creating a folder $fileMetadata = new Google_Service_Drive_DriveFile(array( 'name' => 'IMGUpload', 'mimeType' => 'application/vnd.google-apps.folder')); $file = $service->files->create($fileMetadata, array( 'fields' => 'id')); printf("Folder ID: %s\n", $file->id); //Uploads File $file=$_FILES; $fileMetadata = new Google_Service_Drive_DriveFile(array( 'name' => $file["fileUpload"]["name"], 'parents' => array('1P4vY97UnmJMw14Y3KIm-UV_uyr41ywrO') )); $content = file_get_contents($file["fileUpload"]["tmp_name"]); $file = $service->files->create($fileMetadata, array( 'data' => $content, 'mimeType' => $file["fileUpload"]["type"], 'uploadType' => 'multipart', 'fields' => 'id'));
//Creating a folder $fileMetadata = new Google_Service_Drive_DriveFile(array( 'name' => 'IMGUpload', 'mimeType' => 'application/vnd.google-apps.folder')); $file = $service->files->create($fileMetadata, array( 'fields' => 'id')); printf("Folder ID: %s\n", $file->id);
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง