Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix img to pdf merge conversion type #2476

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

omar-ahmed42
Copy link
Contributor

Description

Root cause:

  • After decrypting the files, the operation "set" was used instead of "append" for inputs files in FormData in download.js

Solution

  1. Remove fileInput entry from FormData to avoid duplicate values.
  2. Append files to the FormData instead of setting them on each operation (as "set" would replace the existing values with the latest one).

Closes #2456

Checklist

  • I have read the Contribution Guidelines
  • I have performed a self-review of my own code
  • I have attached images of the change if it is UI based
  • I have commented my code, particularly in hard-to-understand areas
  • If my code has heavily changed functionality I have updated relevant docs on Stirling-PDFs doc repo
  • My changes generate no new warnings
  • I have read the section Add New Translation Tags (for new translation tags only)

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 16, 2024
@github-actions github-actions bot added the Front End Issues or pull requests related to front-end development label Dec 16, 2024
@dosubot dosubot bot added the Bug Something isn't working label Dec 16, 2024
@omar-ahmed42
Copy link
Contributor Author

Note: There's a bug in "Convert to separate PDFs", reason? form data isn't being sent in the body, only the file is being sent.
(The problem lies mainly in download.js in the frontend, not the backend)

I might work on this later, but let's roll this fix out first so that users could at least merge their images into a single PDF

@Frooodle
Copy link
Member

Thanks for this quick find and fix, will merge and release tomorrow morning

@Frooodle Frooodle enabled auto-merge December 17, 2024 10:35
@Frooodle Frooodle merged commit b3dfdba into Stirling-Tools:main Dec 17, 2024
6 checks passed
@omar-ahmed42
Copy link
Contributor Author

Note: There's a bug in "Convert to separate PDFs", reason? form data isn't being sent in the body, only the file is being sent.
(The problem lies mainly in download.js in the frontend, not the backend)
I might work on this later, but let's roll this fix out first so that users could at least merge their images into a single PDF

Delivered in PR #2492 as promised

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug Something isn't working Front End Issues or pull requests related to front-end development size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: image to pdf not work while merge into one PDF
2 participants