Giter Site home page Giter Site logo

Comments (7)

ABC2015 avatar ABC2015 commented on August 17, 2024

Hi @austintoddj - hope the week is progressing well - Just wanted to confirm whether it's the intention to have gcp spatie OOTB (https://github.com/spatie/laravel-google-cloud-storage) integrated - unless we missed something in the docs) - or should we do the wiring ourselves? We have done this in our other Laravel applications - just wanted to get confirmation one way or the other - thanks in advance.

from canvas.

austintoddj avatar austintoddj commented on August 17, 2024

Hi @ABC2015. I haven't tried integrating that package and Canvas. It seems like it should work out of the box, given that it's a pretty generic storage driver.

The URL being returned is that path to the uploaded file, as seen in the upload method here:

public function store()
{
    $payload = request()->file();

    if (! $payload) {
        return response()->json(null, 400);
    }

    // Only grab the first element because single file uploads
    // are not supported at this time
    $file = reset($payload);

    $path = $file->store(Canvas::baseStoragePath(), [
        'disk' => config('canvas.storage_disk'),
    ]);

    return Storage::disk(config('canvas.storage_disk'))->url($path);
}

What's the payload of the first screenshot (POST request to /api/uploads) above?

from canvas.

ABC2015 avatar ABC2015 commented on August 17, 2024

Hi @austintoddj
https://app.screencast.com/Ft01eBio64W1j (Parsed)
Sourced Payload (Sourced Payload)

from canvas.

ABC2015 avatar ABC2015 commented on August 17, 2024

@austintoddj uploaded the payload - in this case - the path for the uploads vs what's the actual gcp storage does not match from our test - which results in the image not being found.

from canvas.

ABC2015 avatar ABC2015 commented on August 17, 2024

@austintoddj we ended implementing it in a different manner. So we'll close this out.

from canvas.

austintoddj avatar austintoddj commented on August 17, 2024

@ABC2015 Thanks for closing the loop here. Apologies, personal life is a bit nuts right now and I wasn't able to dig into this like I intended.

Feel free to open another issue if something comes up.

from canvas.

ABC2015 avatar ABC2015 commented on August 17, 2024

No worries - all good.

from canvas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.