Xyphyn / photon

A replacement for lemmy-ui with more features, a better design, and more customizability.
https://phtn.app
GNU Affero General Public License v3.0
372 stars 42 forks source link

Upload image gives "string doesn't match expected pattern" #112

Closed jspayne closed 1 year ago

jspayne commented 1 year ago

Describe the bug When creating a post by uploading an image, I get the error "string doesn't match expected format"

To Reproduce (if applicable) Steps to reproduce the behavior:

  1. Go to Create, New Post
  2. Click on image button
  3. Click on Attach an Image, select file
  4. Click upload

Expected behavior Image uploads and is attached to the post

Versions

Xyphyn commented 1 year ago

Photon is at 0.9.6. Try updating to that first.

jgeorgeson commented 1 year ago

I'm seeing similar issues attaching images, either as the post URL, in the post body, or in a comment. For me it's returning a red 500 error response popup in the bottom-right. This is on photon.lemmy.world, running v0.9.6

Xyphyn commented 1 year ago

500 is a server side error, so it's probably an issue with lemmy.world. I'll make the error messages more helpful soon though.

jgeorgeson commented 1 year ago

I forgot to mention that I don't get the error when I switch back to plain old lemmy.world, only with photon.lemmy.world. Though it could still be a configuration issue with their deployment. I'll look for a replace to report it to the admins their too.

Xyphyn commented 1 year ago

This is due to how photon uploads images. Lemmy still has an issue where you can't upload images without a cookie, so i proxy it. It could be an issue with a rate limit or something

Xyphyn commented 1 year ago

Does this issue occur on Voyager as well? If so, it's for the same reason

jgeorgeson commented 1 year ago

I am able to upload images posting at m.lemmy.world.

Xyphyn commented 1 year ago

Strange. It's a 500, so it seems to be a server error. This will be fixed once Lemmy fixes CORS.