*/
public function getBinPathAttribute(): string
{
- return "$this->directory/data.bin";
+ return "$this->directory/file.bin";
}
/**
*/
public function saveToCloud()
{
- $binPath = sys_get_temp_dir().'/'.uniqid('bin_', false);
- file_put_contents($binPath, base64_encode($this->getPdf()));
- Storage::cloud()->putFileAs('/', $binPath, $this->binPath);
- unlink($binPath);
+// $binPath = sys_get_temp_dir().'/'.uniqid('bin_', false);
+// file_put_contents($binPath, base64_encode($this->getPdf()));
+ Storage::cloud()->putFileAs('/', $this->absolutePdfPath, $this->binPath);
+// unlink($binPath);
}
- $.get(url)
- .then(function(d) {
+ // $.get(url)
+ // .then(function(d) {
$('#documentViewer').FlowPaperViewer(
{
config: {
- PDFFile: "data:application/octet-stream;base64,"+d,
+ PDFFile: url,
Scale: 0.6,
ZoomTransition: 'easeOut',
ZoomTime: 0.5,
}
}
);
- })
}