agentejo / cloudstorage Goto Github PK
View Code? Open in Web Editor NEWCloud storage addon for Cockpit CMS - https://github.com/agentejo/cockpit
Cloud storage addon for Cockpit CMS - https://github.com/agentejo/cockpit
Hey there i am trying to upload videos to cloud storage from the control panel. The connection credentials and configuration work as i can upload images to the AWS S3 bucket that i am using via the cockpit CMS asset manager.
However when trying to do the same with .mp4 video files i get a something went wrong error with the red box that appears from the control panel for a few seconds.
When i turn off the cloud storage addon, the file can be uploaded locally, however i want to be able to use it from my S3 Bucket. The access credentials for the S3 have full rights, and there is no bucket policy preventing anything.
I have also been able directly connected to the bucket using the same credentials using SFTP (Cloudberry) and uploaded the video manually, no issue.
Somewhat separately, but related to trying to solve the issue, i have tried to get debugging working inside a docker container, however when i trigger this issue it doesn't' seem to work. I have added the following to my php.ini file and config.yaml file, but nothing outputs.
#php.ini
log_errors = on
error_reporting = 32767
error_log = /var/www/html/log.php
#config.yaml
debug:true
Any help or how i can debug further is greatly appreciated.
When attempting to clone this repo, I get this error about a file name being too long. It appears there is a symlink in the repo, which seems a little strange. In any case, there would appear to be something broken about it - it's failing both for me locally (macOS Sierra) and in our Jenkins deployment (centos 7)
how is it possible to set the files to public-read?
I am using self-hosted minio (which implements full s3 compatible interface) as the backend storage. Since I was allowed to set my custom url in the config, I assumed minio should just work out of box. However I encountered a hard-coded url in the lib when I tried to upload to minio.
<br />
<b>Fatal error</b>: Uncaught exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "ListObjects" on "https://xy-production.s3.cn-foshan-1.amazonaws.com.cn/?prefix=cockpit%2F2018%2F06%2F28%2F5b348ebac5e21php%2F&max-keys=1&encoding-type=url"; AWS HTTP error: cURL error 6: Could not resolve host: xy-production.s3.cn-foshan-1.amazonaws.com.cn (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)'
GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: xy-production.s3.cn-foshan-1.amazonaws.com.cn (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in /var/www/html/addons/CloudStorage/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:185
Stack trace:
#0 /var/www/html/addons/CloudStorage/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 /var/www/html/addons/CloudStorage/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(Guzzl in <b>/var/www/html/addons/CloudStorage/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php</b> on line <b>191</b><br />
I've configured this to work with Wasabi, which is an S3 compatible object storage service. However, whenever I attempt to upload an asset, it says "Something went wrong." There are no errors in either the console or php_error.log. Where can I find the error so I can figure out what the problem is?
Authorize Google Cloud Storage with an environment variable like this:
ENV GOOGLE_APPLICATION_CREDENTIALS=/keyFile.json
How exactly? Systemwide env or env specific to cockpit?
Notice: Undefined index: endpoint in C:\xampp\htdocs\addons\CloudStorage\bootstrap.php on line 46, referer: http://localhost/assetsmanager
I was getting an upload error. After I commented the line 46 the issue is gone.
Old line 46 $settings['endpoint'] ? ['endpoint' => $settings['endpoint']] : []
New line 46 //$settings['endpoint'] ? ['endpoint' => $settings['endpoint']] : []
Disregard
Hi,
I tried to install this addon with cockpit master branch but it didn't seem to work. I wonder if it is an error on my side.
Hi @aheinze ,
I'm trying to setup the S3 cloud storage and have got my yaml config file updated with my connection info, but the part I'm a bit unclear on is how the bucket needs to setup in S3. I have set the public section of the access control to list objects and read bucket permissions and set the bucket policy to:
{
"Version": "2012-10-17",
"Id": "Policy1565701876440",
"Statement": [
{
"Sid": "Stmt1565701866682",
"Effect": "Allow",
"Principal": "",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::smokeyfro/"
}
]
}
The cors config section is empty.
Do you have any idea what I'm missing? I'm on Cockpit Next (0.9.2)
TIA,
Chris
Please see https://discourse.getcockpit.com/t/issues-with-s3-cloudstorage-addon-in-docker/1545 for details
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.