Fix: make /attachments/{attachmentId} endpoint work by adding AttachmentId to EditableAttachment and renaming attachmentIdValue to attachmentId in GetAttachmentForEditing#39966
Conversation
|
Hi, thanks for this contribution! I found some issues with the Pull Request description:
Would you mind having a look at it? This will help us understand how interesting your contribution is, thank you very much! (Note: this is an automated message, but answering it will reach a real human) |
…o attachmentId in GetAttachmentForEditing (fix /attachments/{attachmentId} endpoint)
0e6971d to
1f270fd
Compare
…chments/{attachmentId} endpoint)
|
@tleon @nicosomb @boherm Thanks a lot 🙏 |
64bb3fc to
1b73c0e
Compare
…Name(), setFileSize(). setMimeType(), setOriginalName() methods
1b73c0e to
4caf945
Compare
|
Hello @Codencode , Thank you for your contribution to PrestaShop! We would like to inform you that PrestaShop 9.1 has been officially released. You can find the full announcement at the following link: Following this release, 9.0.x is no longer the active development branch. To ensure your changes can be reviewed and merged, please rebase this pull request onto the
If you have any questions or need assistance with the rebase process, do not hesitate to ask. Thank you for your understanding and continued support! |
Add AttachmentId to EditableAttachment and rename attachmentIdValue to attachmentId in GetAttachmentForEditing (fix /attachments/{attachmentId} endpoint)
/attachments/{attachmentId}API endpoint, currently being developed in PrestaShop/ps_apiresources#105.🐛 Fixes
- Fixed the
/attachments/{attachmentId}endpoint by adding theAttachmentIdparameter toEditableAttachmentand renamingattachmentIdValue→attachmentIdinGetAttachmentForEditing.- Ensures correct mapping and retrieval of attachment data for API serialization/deserialization.
🧱 Refactors
-
EditAttachmentCommand: constructor now acceptsint $attachmentIdinstead of anAttachmentIdvalue object, ensuring compatibility with API Platform.-
AddAttachmentCommandandEditAttachmentCommand: added setterssetPathName(),setFileSize(),setMimeType(),setOriginalName()to improve flexibility when building commands from uploaded file metadata.