comment
This commit is contained in:
		
							parent
							
								
									cb706113cd
								
							
						
					
					
						commit
						968339cfd9
					
				
							
								
								
									
										2
									
								
								epub.php
								
								
								
								
							
							
						
						
									
										2
									
								
								epub.php
								
								
								
								
							| 
						 | 
					@ -112,6 +112,8 @@
 | 
				
			||||||
						$imageid = $image->ContentItemId;
 | 
											$imageid = $image->ContentItemId;
 | 
				
			||||||
						$imageurl = preg_replace('/GetPublicationContentItems-.*\.json/', 'Image-MEDIUM-' . $imageid . '.jpg', $url);
 | 
											$imageurl = preg_replace('/GetPublicationContentItems-.*\.json/', 'Image-MEDIUM-' . $imageid . '.jpg', $url);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
											// Download image from source, put it in temp and include it into article main html content.
 | 
				
			||||||
 | 
											// Then pass true to last AddPage param to download image to epub.
 | 
				
			||||||
						$tempimgpath = './temp/' . $imageid . '.jpg';
 | 
											$tempimgpath = './temp/' . $imageid . '.jpg';
 | 
				
			||||||
						$tempcontent = file_get_contents($imageurl);
 | 
											$tempcontent = file_get_contents($imageurl);
 | 
				
			||||||
						file_put_contents($tempimgpath, $tempcontent);
 | 
											file_put_contents($tempimgpath, $tempcontent);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue