diff --git a/app/Http/Controllers/AWS/AWSImageUploadController.php b/app/Http/Controllers/AWS/AWSImageUploadController.php deleted file mode 100644 index b258b3ee..00000000 --- a/app/Http/Controllers/AWS/AWSImageUploadController.php +++ /dev/null @@ -1,50 +0,0 @@ -validate([ - 'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', - ]); - - $imageName = time().'.'.$request->image->extension(); - - $request->image->storeAs('images', $imageName); - - return back() - ->with('success','You have successfully upload image.') - ->with('image',$imageName); - } - - - public function displayImage($fileName) - { - $path = 'images/'.$fileName; - $file = Storage::get($path); - $type = Storage::mimeType($path); - - $response = Response::make($file, 200); - $response->header("Content-Type", $type); - - return $response; - } - -} diff --git a/resources/views/pages/aws_image_upload.blade.php b/resources/views/pages/aws_image_upload.blade.php deleted file mode 100644 index 7e6e91f5..00000000 --- a/resources/views/pages/aws_image_upload.blade.php +++ /dev/null @@ -1,43 +0,0 @@ -@extends('layouts.base_portal') -@section('inner_content') -
-
-

Image Upload with Laravel Vapor

-
- - @if ($message = Session::get('success')) -
- - {{ $message }} -
- - @endif - - @if (count($errors) > 0) -
- Whoops! There were some problems with your input. -
    - @foreach ($errors->all() as $error) -
  • {{ $error }}
  • - @endforeach -
-
- @endif - - -
- @csrf -
-
- -
- -
- -
-
-
-
-
-
-@endsection diff --git a/routes/web.php b/routes/web.php index 53260db6..7ba6d068 100644 --- a/routes/web.php +++ b/routes/web.php @@ -601,8 +601,3 @@ Route::get('/po/outsource/check', function(){ Route::get('/upload-honey-trap', function () { return view('pages.honey_trap'); })->name('upload_honey_trap'); - - -Route::get('/aws-image-upload', 'AWS\AWSImageUploadController@imageUpload')->name('aws.image.upload'); -Route::post('/aws-image-upload', 'AWS\AWSImageUploadController@imageUploadPost')->name('aws.image.upload.post'); -Route::get('/aws-image/{filename}', 'AWS\AWSImageUploadController@displayImage')->name('aws.image.displayImage');