Answers for "download image from url laravel"

1

how to store an image in laravel directly from url

use Storage;
$url = "http://www.google.co.in/intl/en_com/images/srpr/logo1w.png";
$contents = file_get_contents($url);
$name = substr($url, strrpos($url, '/') + 1);
Storage::put($name, $contents);
Posted by: Guest on June-19-2021
1

flutter download image from url

final ByteData imageData = await NetworkAssetBundle(Uri.parse("YOUR_URL")).load("");
final Uint8List bytes = imageData.buffer.asUint8List();
// display it with the Image.memory widget
Image.memory(bytes);
Posted by: Guest on November-13-2020

Code answers related to "download image from url laravel"

Code answers related to "Dart"

Browse Popular Code Answers by Language