0

I am trying to upload an image using form in my Laravel blade template. But got an error like below in my logfile wile submit the form.

local.ERROR: ErrorException: copy(F:\Xampp\htdocs\fund\public/campaigns/small/91554568481ucgbkygnwrdvx0dpfkvyubi6zepi6bp3jrdouf30.png): failed to open stream: No such file or directory in F:\Xampp\htdocs\fund\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:204

html form

<form method="POST" action="{{ url('create/campaign') }}" enctype="multipart/form-data" id="formUpload">

    <input type="hidden" name="_token" value="{{ csrf_token() }}">
    <div class="filer-input-dragDrop position-relative" id="draggable">
        <input type="file" accept="image/*" name="photo" id="filePhoto">

        <!-- previewPhoto -->
        <div class="previewPhoto">

            <div class="btn btn-danger btn-sm btn-remove-photo" id="removePhoto">
                <i class="fa fa-trash myicon-right"></i> {{trans('misc.delete')}}
                </div>

        </div><!-- previewPhoto -->

        <div class="filer-input-inner">
            <div class="filer-input-icon">
                <i class="fa fa-cloud-upload"></i>
                </div>
                <div class="filer-input-text">
                    <h3 class="margin-bottom-10">{{ trans('misc.click_select_image') }}</h3>
                    <h3>{{ trans('misc.max_size') }}: {{App\Helper::formatBytes($settings->file_size_allowed * 1024) .' - '.$settings->min_width_height_image}} </h3>
                </div>
            </div>
        </div>

I am googling for that but not getting any solution yet. What's the problem and if there is any folder permission related issue then how to solve that ?

Anybody Help please ? Thanks in advance

3
  • Maybe the answer here: stackoverflow.com/a/29581321/1457270 will help? Commented Apr 6, 2019 at 17:11
  • @nakov...can't solve my problem Commented Apr 6, 2019 at 17:33
  • Can you share the controller code which handles the form POST? Commented Apr 6, 2019 at 21:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.