rayronvictor Github contribution chart
rayronvictor Github Stats
rayronvictor Most Used Languages

Activity

05 Oct 2022

Issue Comment

Rayronvictor

images not showing on laravel 5.4

Hi, Just installed intervention/image and intervention/imagecache on laravel 5.4 I couldn't get the package working right. Tracked down the way how the image should be displayed all down to the ImageCacheController. Requesting the original route The current output it returns is:

<html><head><meta name="viewport" content="width=device-width, minimum-scale=0.1"></head><body style="margin: 0px; background: rgb(14, 14, 14);"><img style="-webkit-user-select: none;background-position: 0px 0px, 10px 10px;background-size: 20px 20px;background-color: white;background-image:linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee 100%),linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee 100%);" src="http://domain.ext/img/original/image.jpg"></body></html> 

and it's not showing any picture, only a square on a black screen: squareinblack.png

when i change the getOriginal function to:

/**
     * Get HTTP response of original image file
     *
     * @param  string $filename
     * @return Illuminate\Http\Response
     */
    public function getOriginal($filename)
    {
        $path = $this->getImagePath($filename);

        //return $this->buildResponse();
    
        $imageData = base64_encode(file_get_contents($path));

        // Format the image SRC:  data:{mime};base64,{data};
        $src = 'data: '.mime_content_type($path).';base64,'.$imageData;

        // Echo out a sample image
        return '<img src="' . $src . '">';
    } 

and requesting the original route, the output is:

<html><head></head><body><img src="data: image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQICAQECAQEBAgICAgICAgICA............etc................."></body></html> 

and it's just working

I think something is wrong with the buildResponse function?

requesting other pre defined templates like small, medium and large are giving the same square as result.

Bart

Forked On 05 Oct 2022 at 02:47:59

Rayronvictor

"Found a space before the php tag in my package's config file"

https://github.com/laravel/framework/issues/18687#issuecomment-292141468

Commented On 05 Oct 2022 at 02:47:59
Issue Comment

Rayronvictor

Implement long Press for Drag, click for other logic

I want to implement a primary feature:

  1. If the user long press the mouse button, trigger the drag.
  2. If the user does a simple click, handle it using the onClick event.

Forked On 27 Sep 2022 at 04:31:07

Rayronvictor

You can use Activation Constraints for that https://docs.dndkit.com/api-documentation/sensors/pointer#activation-constraints

Commented On 27 Sep 2022 at 04:31:07

Rayronvictor

started

Started On 20 Sep 2022 at 05:49:49

Rayronvictor

started

Started On 30 Aug 2022 at 09:51:15

Rayronvictor

started

Started On 25 Aug 2022 at 12:32:05

Rayronvictor

started

Started On 19 Aug 2022 at 01:14:38

Rayronvictor

started

Started On 19 Aug 2022 at 01:14:36

Rayronvictor

started

Started On 13 Aug 2022 at 11:08:02

Rayronvictor

started

Started On 27 Jul 2022 at 08:31:50

Rayronvictor

started

Started On 27 Jul 2022 at 10:39:47
Issue Comment

Rayronvictor

form 的 onFieldsChange 希望导出 FieldData typing

What problem does this feature solve?

写 ts 的时候比较难拿到这个 typing. 现在想拿这个定义非常之麻烦..

import type { FieldData } from 'rc-field-form/lib/interface'; 

What does the proposed API look like?

import type { FieldData } from 'antd/lib/form';

const onFieldsChange = useCallback((changedFields: FieldData[]) => {}, []); 

Forked On 25 Jul 2022 at 07:33:40

Rayronvictor

@RaoHai

import { FormProps } from 'antd';

type FieldData = Exclude<FormProps['fields'], undefined>[number]; 

Commented On 25 Jul 2022 at 07:33:40

Rayronvictor

started

Started On 18 Jul 2022 at 09:08:21