davidtrushkov / store

A ecommerce store using Laravel 5.2
87 stars 62 forks source link

Product Images #11

Open JordinMarshall opened 8 years ago

JordinMarshall commented 8 years ago

Product Images wont save. After I upload them they sit in the upload box with an X and the only option to select is show. After clicking show the page reloads like the code tells it to do but the image never saves. How can I get the images to save?

JordinMarshall commented 8 years ago

And I just noticed when I hover over the images as they display an X it displays the code for the 404 error file

davidtrushkov commented 7 years ago

For the images, when you upload them, they upload into the /public/ProducrPhotos/photos/. Do they upload there?

aries84ct commented 7 years ago

Hello, same problem here. I'm unable to save the images, since I can't find any Save button, there is only a Show button. No upload is done.

malandriso commented 7 years ago

Same problem.

malandriso commented 7 years ago

Also, in ProductPhotosController.php, you mention a "dropzone.forms.js" file in the first method. I can't seem to find that file anywhere.

class ProductPhotosController extends Controller {

    /**
     * @param $id
     * @param ProductPhotoRequest $request
     */
    public function store($id, ProductPhotoRequest $request) {
        // Set $product = Product::LocatedAt() in (Product.php Model) = to the id
        // -- Find the product.
        $product = Product::LocatedAt($id);

        // Store the photo from the file instance
        // -- ('photo') is coming from "public/js/dropzone.forms.js" --
        $photo = $request->file('photo');

        // Create dedicated class to add photos to product, and save the photos.
        (new AddPhotoToProduct($product, $photo))->save();
    }
Kolovrat19 commented 7 years ago

Done. Edit upload.blade.php "/store/admin/......." on ''/admin/.......".