Comments (7)
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.
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.
Hi @austintoddj
https://app.screencast.com/Ft01eBio64W1j (Parsed)
(Sourced Payload)
from canvas.
@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.
@austintoddj we ended implementing it in a different manner. So we'll close this out.
from canvas.
@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.
No worries - all good.
from canvas.
Related Issues (20)
- Is there an artisan command to regenerate an admin user? HOT 1
- Endless loop HOT 2
- How to remove /canvas-ui from url? HOT 1
- Embed Code content doesn't use <pre> tag
- Empty CANVAS_PATH breaks the image uploads HOT 1
- PostStats@getDefaultFavicon returns an error
- is it possible to add new page/module like posts and tags module? HOT 1
- Migration guide from themsaid's wink to canvas
- Ability to create Page HOT 2
- Addin a RSS Feed URL for Post Feed
- Adding a sitemap.xml URL for SEO
- Vendor folder gives 404 HOT 3
- Does not work if you have Vue3 installed HOT 2
- Create a Model Factory for Canvas Posts HOT 2
- Invalid text representation: canvas_users:id -> sessions:user_id HOT 2
- Laravel 11 | Warning 1265 Data truncated for 'user_id' HOT 4
- Meta tags for topics and tags
- When i create new post , then type some character in the title it will automatically back
- Syntax colour in code block is unreadable in editor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canvas.