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

500 server error on file download #242

Open
Art4 opened this issue Jan 29, 2024 · 5 comments
Open

500 server error on file download #242

Art4 opened this issue Jan 29, 2024 · 5 comments

Comments

@Art4
Copy link
Contributor

Art4 commented Jan 29, 2024

Describe the bug

I can not download a file I've uploaded within a data processing.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Auftragsverarbeitung anlegen' https://app.open-datenschutzcenter.de/auftragsverarbeitung/new
  2. Go to 'Dokument zur Datenweitergabe hochladen' and upload a PDF
  3. Click save and go to the new entry.
  4. Click on "AVV herunterladen"
  5. A new tab opens, the file is not downloaded

Expected behavior
The file should be downloaded or viewed.

Screenshots

grafik

Additional context

The click starts a request to https://app.open-datenschutzcenter.de/datenweitergabe/download/<id> (int Id redacted) and the server replies with a 500 Server error.

@Art4
Copy link
Contributor Author

Art4 commented Jan 29, 2024

I can reproduce this error on the demo page: https://demo.open-datenschutzcenter.de/datenweitergabe/download/94

Attempted to call an undefined method named "getMimetype" of class "League\Flysystem\Filesystem".

grafik

@holema
Copy link
Collaborator

holema commented Jan 29, 2024

Hello, this seems to be a weird problem.
Is it working on other places in the ODC where documents can be uploaded?
@holzi1005 DO you have any idea?

@Art4
Copy link
Contributor Author

Art4 commented Jan 29, 2024

In #142 the library league/flysystem was updated to v2. The API for getting the mime type with (docs v1)

$response = $filesystem->getMimetype($path);

was changed to (docs v2):

try {
    $mimeType = $filesystem->mimeType($path);
} catch (FilesystemException | UnableToRetrieveMetadata $exception) {
    // handle the error
}

In #163 there was made adjustments for v2, but these were not enough.

Art4 added a commit to Art4/open-datenschutzcenter that referenced this issue Jan 30, 2024
@Art4 Art4 mentioned this issue Jan 30, 2024
@Art4
Copy link
Contributor Author

Art4 commented Jan 30, 2024

I've created #245 to fix this issue.

@holema
Copy link
Collaborator

holema commented Feb 5, 2024

Hallo @Art4,

vielen dank für diene Mithilfe. Wir waren die letzte Woche nicht im Büro, weshalb deine PRs liegen geblieben sind.
Wir werden und alle deine PRs diese Woche anschauen und dir dann eine Rückmeldung geben.

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

2 participants