# |
Apr 3rd 2019, 09:38 |
asdfgh |
i do not understand the reason |
# |
Apr 3rd 2019, 09:37 |
asdfgh |
guys why do i get bash: bin/cake: No such file or directory ??? i run composer install |
# |
Apr 3rd 2019, 09:31 |
challgren |
Guess its time for a custom Writer |
# |
Apr 3rd 2019, 09:30 |
challgren |
But if I could pass Config on https://github.com/FriendsOfCake/cakephp-upload/blob/master/src/File/Writer/DefaultWriter.php#L122 I could manually set the ContentType |
# |
Apr 3rd 2019, 09:29 |
challgren |
So it can serve it correctly |
# |
Apr 3rd 2019, 09:29 |
challgren |
But S3 needs the content-type |
# |
Apr 3rd 2019, 09:28 |
challgren |
Thats part of FlySystem |
# |
Apr 3rd 2019, 09:28 |
admad |
Why is it even trying to detect type using extension, it's error prone anyway. Don't you have finfo() available? |
# |
Apr 3rd 2019, 09:22 |
challgren |
But not really a cakephp-upload bug either |
# |
Apr 3rd 2019, 09:20 |
challgren |
Its not really the adapters bug |
# |
Apr 3rd 2019, 09:20 |
challgren |
Well the easiest solution would be to have a custom writerinterface it seems |
# |
Apr 3rd 2019, 09:20 |
neon1024 |
Perhaps you can submit a failing test |
# |
Apr 3rd 2019, 09:19 |
neon1024 |
Check the test-cases |
# |
Apr 3rd 2019, 09:19 |
neon1024 |
Sounds like a bug then |
# |
Apr 3rd 2019, 09:19 |
challgren |
so I guess my solution would be to rename the temp file |
# |
Apr 3rd 2019, 09:19 |
challgren |
Just the path to the tmp file |
# |
Apr 3rd 2019, 09:19 |
neon1024 |
Well yeah, that’s guessing using the absolute file path, so it probably isn’t an uploaded file array |
# |
Apr 3rd 2019, 09:18 |
challgren |
But its in the adapter |
# |
Apr 3rd 2019, 09:18 |
challgren |
https://github.com/thephpleague/flysystem-aws-s3-v3/blob/master/src/AwsS3Adapter.php#L577 |
# |
Apr 3rd 2019, 09:17 |
neon1024 |
Indeed, but the `['name']` will do ;) |
# |
Apr 3rd 2019, 09:16 |
challgren |
Actually it fails and returns text/plain because the tmp file doesnt have an extension |
# |
Apr 3rd 2019, 09:15 |
challgren |
https://github.com/thephpleague/flysystem/blob/master/src/Util/MimeType.php#L218 fails and then calls the detectByFileExtension |
# |
Apr 3rd 2019, 09:14 |
challgren |
It does https://github.com/thephpleague/flysystem/blob/master/src/Util/MimeType.php#L202:28 |
# |
Apr 3rd 2019, 09:10 |
neon1024 |
Although that won’t have any impact |
# |
Apr 3rd 2019, 09:10 |
neon1024 |
It will be |
# |
Apr 3rd 2019, 09:09 |
challgren |
It tries to guess it but I think it's working on the temp name |
# |
Apr 3rd 2019, 09:09 |
challgren |
Set one when using awss3adapter |
# |
Apr 3rd 2019, 09:09 |
neon1024 |
I used the file info php extension |
# |
Apr 3rd 2019, 09:09 |
neon1024 |
Set one? Or do you mean read the mime type from the uploaded file? |
# |
Apr 3rd 2019, 09:08 |
challgren |
Any have an idea how to set a mine type when using foc/upload? |
# |
Apr 3rd 2019, 09:06 |
neon1024 |
It sure does! |
# |
Apr 3rd 2019, 09:05 |
birdy247 |
@neon1024 app.php gets loaded in bootstrap.php |
# |
Apr 3rd 2019, 09:05 |
challgren |
I don't think any really |
# |
Apr 3rd 2019, 09:01 |
neon1024 |
All I can think is the obvious app.default.php to app.php thing, and that app.php will be config will be consumed sooner |
# |
Apr 3rd 2019, 09:00 |
neon1024 |
Stupid question, but what are the differences between setting something in app.php and using Configure::write() in say bootstrap? |
# |
Apr 3rd 2019, 08:58 |
birdy247 |
I managed this on my home computer, but cant get this working on the work computers |
# |
Apr 3rd 2019, 08:57 |
birdy247 |
I am trying to connect to my cakebox with SFTP |
# |
Apr 3rd 2019, 08:57 |
birdy247 |
@bravo-kernel just the man :slightly_smiling_face: |
# |
Apr 3rd 2019, 08:43 |
challgren |
snake-venom I think you would do something along the following lines $response = $this->response->withStatus(401); $this->setResponse($response); $this->set(‘message’, ‘bad message’); $this->set(‘_serialize’, [‘message’]); |
# |
Apr 3rd 2019, 08:28 |
challgren |
snake-venom you could throw an exception with a custom message. Im not 100% sure the correct way to do it. |
# |
Apr 3rd 2019, 08:27 |
liaogz82 |
check with you guys, are there phpspec support for cakephp? |