Category : blob

I have upload a jpg file in mysql table as blob type. and i read the image in below code for html table and not getting. echo "<tr> <td>".$row[‘ids’]."</td> <td>".$row[‘vendor_name’]."</td> <td>".$row[‘invoice_number’]."</td> <td>".$row[‘cost’]."</td> <td>".$row[‘quantity’]."</td> <td>".$row[‘paid_amount’]."</td> <td>".$paymentStatus."</td> <td>".$row[‘invoice_date’]."</td> <td> <img src=’data:image/jpeg;base64,".base64_encode($row[‘ image’])."’ width=’100′ height=’100′ /> </td> in Table, display as error bit image and not getting image ..

Read more

I have a database which contains images saved as BLOBs. I can successfully use the image on a page like so : <img src="<?php echo ‘data:image/jpeg;base64,’.base64_encode($image)?>" alt="Landing" width="150px"> However this requires setting the file extension manually in the actual statement at data:image/jpeg;. The problem is that I have lots of various images in various formats. ..

Read more

I have 3 tables: 1- questions 2- answers 3- user_answers questions _________________ | id | question | |____|__________| | 1 | 1+1 | |____|__________| answers _________________ | id | answer | |____|__________| | 1 | 1 | |____|__________| | 2 | 3 | |____|__________| | 3 | 2 | |____|__________| user_answers ______________________________________________ | id | ..

Read more

I’m trying to download a blob video from a URL and save it to my Laravel project. The blob URL is not created in the same domain/project. $fileName = "myvideo.webm"; $url = blob:https://example.com/a7f97758-0ef2-4597-8ddd-ca660772c03c I’m try this: Storage::put($fileName,$url, ‘public’); This works but the file is empty. Sourc..

Read more

I try to use this code to download files from my database, however, when I try to open the file, I get following errors: when downloading file type ‘image’ when downloading file type ‘docx’ Php code: <?php include_once ‘dbconfig.php’; if (isset($_GET[‘id’])) { $id = $_GET[‘id’]; $query = "SELECT * FROM files_data WHERE id = ‘$id’"; ..

Read more