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

Expose attachments checksums in the export API #5084

Closed
avivace opened this issue Sep 13, 2021 · 3 comments
Closed

Expose attachments checksums in the export API #5084

avivace opened this issue Sep 13, 2021 · 3 comments

Comments

@avivace
Copy link
Contributor

avivace commented Sep 13, 2021

The /export/event/ endpoint seems to not mention any kind of checksum for the attached files.

As I understood from the AbstractFile model, you do already compute and save MD5 checksums. If this is consistent through all the attached files in events, would it be possible to expose this information in the API?

@avivace
Copy link
Contributor Author

avivace commented Nov 12, 2021

This would also make possible to find duplicates in attachments, since files with the same names are allowed.
E.g. on "ilcagenda", record 1049, has files with same name in the same directory/level, so there's no way from the API to understand if it's just a duplicate or they are actually duplicate entries (in that case they are actually slightly different files).

@ThiefMaster
Copy link
Member

Yes, we store an md5 hash for all attachments, so we could indeed include this in the APIs. Would you like to send a PR for this? I think including the attachment.file.md5 in _build_attachment_api_data is all that's needed.

@avivace
Copy link
Contributor Author

avivace commented Nov 17, 2021

Yes, we store an md5 hash for all attachments, so we could indeed include this in the APIs. Would you like to send a PR for this? I think including the attachment.file.md5 in _build_attachment_api_data is all that's needed.

Sure, I can take a look

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

No branches or pull requests

2 participants