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

Fresh Install, unable to upload photos #7191

Open
3 tasks done
s3rv3rn3rd opened this issue Mar 13, 2024 · 3 comments
Open
3 tasks done

Fresh Install, unable to upload photos #7191

s3rv3rn3rd opened this issue Mar 13, 2024 · 3 comments
Labels

Comments

@s3rv3rn3rd
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • I agree to follow Monica's Code of Conduct.

Bug description

Unable to upload photos

Steps to reproduce

  1. Editing the contact photo and attempting to upload a new image results in the error message "The photo failed to upload.
    The data field is required when photo is not present."
  2. Uploading a photo to the photos section results in an error "There was an error uploading the document. Please try again below."
  3. I am able to upload the same exact photo as a document, though. No errors, the image uploads just fine.
    ...

Expected behavior

The image should upload

Environment

Your own self-hosted instance (monica v4)

Version of Monica

4.0.0

Installation method

Manual installation with Archive

Web server

Apache

Database engine version

MySQL

Additional info

This is a fresh install. I've been able to add data but unable to upload photos in any area where it leverages them as a photo.

@s3rv3rn3rd s3rv3rn3rd added the bug label Mar 13, 2024
@Totengeist
Copy link

Totengeist commented Mar 14, 2024

I got this error after upgrading, and it was due to missing .key files in storage. Try running php artisan passport:keys. I realized later that I had forgotten to move the storage directory back in after the upgrade.

If this doesn't solve it, try using the browser Developer Console to see what the server actually returns on that request. In my case the error made the problem much clearer.

@s3rv3rn3rd
Copy link
Author

I tried running the artisan command but that didn't resolve it. Do I need to run that from within the storage directory or just within the main monica folder?

I tried uploading again while observing with the developer tools and what's interesting is if I try and update the contact image, i don't actually get an error. I have a few warnings on the page but no errors, despite it giving the error on the page when it fails to upload.

Then I went and tried to upload the photo in the photos section and I get an error on that one. From there, I get:

POST https://monica.domain.com/peop vendor.js?id=c9e292e41ff5d105838cea3bea92363d:2le/h:J4q2VolejRejNmGQBW/photos 422 (Unprocessable Content)

And then it lists off the different js files.

@Rex-0x7CB
Copy link

I faced the same issue while uploading a PDF in the document section under a contact. I kept getting HTTP Error 422 in the browser network logs. I found a work around - I zipped the PDF and uploaded it and it worked!
I know this isn't the best solution, not the expected behavior, but, until the devs fix it, this is all we can do.

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

No branches or pull requests

3 participants