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

Adding the index (order) to the end of filename could lead to filename crashes for 2 different media (PR #50 to fix this) #51

Closed
HuskyZa opened this issue Feb 22, 2025 · 2 comments

Comments

@HuskyZa
Copy link
Contributor

HuskyZa commented Feb 22, 2025

In version 2.2.6, we've introduced an indexing feature that appends an index to the filename for multiple media files within the same post or story, resulting in filenames formatted as <postId>_<index>.jpg or <storyId>_<index>.jpg.

While this approach ensures unique filenames for posts with index at the end of filename, it presents challenges for stories. Since stories are ephemeral and their order can change dynamically, the appended index may lead to filename clashes, causing different stories to generate identical filenames. Additionally, if medias within a post are re-ordered by the owner, re-downloading them could result in filename changes.

@HuskyZa
Copy link
Contributor Author

HuskyZa commented Feb 22, 2025

I’ve submitted PR #50 v2.3.0, which introduces an option to disable the indexing feature originally added in v2.2.6. Users who prefer the indexed posts behavior—as requested in Issue #45 by Ecdldaiiere—can enable the feature, while those who favor unique filenames over time can choose to disable it.

Image

@HuskyZa HuskyZa changed the title Adding the index to the end of filename could lead to filename crashes for 2 different media (PR #50 to fix this) Adding the index (order) to the end of filename could lead to filename crashes for 2 different media (PR #50 to fix this) Feb 22, 2025
@HuskyZa
Copy link
Contributor Author

HuskyZa commented Feb 23, 2025

PR #50 has been merged

@HuskyZa HuskyZa closed this as completed Feb 23, 2025
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

1 participant