Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Upload image not working #17

Open
madeus opened this issue Nov 28, 2024 · 10 comments
Open

[Bug] Upload image not working #17

madeus opened this issue Nov 28, 2024 · 10 comments
Assignees

Comments

@madeus
Copy link

madeus commented Nov 28, 2024

  • I'm submitting a:

    • [x ] Bug Report
    • Version: 0.0.2
    • Browser: [all]
    • Operating System: Roxcky Linux 9.5

I try to add a photo, and then I see only an error during upload. The logs are empty. SELinux is clean.

image

And the second question also concerns images. What should be the correct path if I want to change the logo? I've tried every possible option and none of them work.

image

@hayzamjs
Copy link
Contributor

hayzamjs commented Nov 28, 2024

Do you have a valid S3 config in your config.json? Also are there some logs on the server side? You could add "logLevel": "debug", too to the config.json to get some verbose messages

Regarding the path to the image it should be something that's hosted somewhere like in the case of our own documentation we have:

@madeus
Copy link
Author

madeus commented Nov 28, 2024

I don't have S3. Do I need to add photos?

@madeus
Copy link
Author

madeus commented Nov 28, 2024

Are you saying that I need to host the logos somewhere outside of the Kalmia instance itself?

@hayzamjs
Copy link
Contributor

Yes, currently we use S3 for dealing with image/other file storage, and yes for the favicon/other images I mentioned (that pertains to documentation edit itself) earlier they need to be hosted somewhere atm, although it makes sense to have a file input here that can store to the db because it makes things simpler, we'll look into that.

@madeus
Copy link
Author

madeus commented Nov 28, 2024

Not everyone has the ability (access) to S3. It would be nice to have other (more "local") options. ;-)

@hayzamjs
Copy link
Contributor

I understand your point, and having some crucial images stored in the database is a good idea. However, regarding other images, I don't think we'll add any more options, as it doesn't have to be Amazon's S3 specifically; it can be any S3-compatible storage. Earlier in issue #7, a user mentioned using MinIO, if I recall correctly. We use MinIO in-house for testing and Cloudflare R2 for production.

@madeus
Copy link
Author

madeus commented Nov 28, 2024

This doesn't change the fact that S3 is not available to everyone. I can use QuObjects from QNAP, for example, because I have access to it. Another has MinIO. But not everyone has such capabilities. It's worth considering other options.

Anyway, I'll check S3 (from QNAP) and let you know.

@madeus
Copy link
Author

madeus commented Nov 28, 2024

I added S3 configuration:

"s3": {
    "endpoint": "https://domain.pl:8010",
    "region": "auto",
    "accessKeyId": "************************",
    "secretAccessKey": "************************",
    "bucket": "DocS3Bucket",
    "usePathStyle": true,
    "publicUrlFormat": "https://domain.pl:8010/v1/AUTH_DocS3/DocS3Bucket/%s"
  }

Same error. The only difference is that when I add e.g. an image as Embed (the link leads to S3 of course), the image is visible correctly. However, when I try to add it as Upload, I get the same error.

@hayzamjs
Copy link
Contributor

Unfortunately I cannot reproduce the issue (I tried image upload using both the button and copy pasting to the editor which is what I usually do), can you give me a video of the problem happening? And also browser console logs if any.

@madeus
Copy link
Author

madeus commented Nov 28, 2024

kalmia_upload

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants