Closed kavimuru closed 1 year ago
Triggered auto assignment to @adelekennedy (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Triggered auto assignment to @abekkala (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Job added to Upwork: https://www.upwork.com/jobs/~01840b20615262c1d1
Current assignee @abekkala is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External
)
Triggered auto assignment to @Gonals (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Unable to upload an svg
image in chat even though it's possible to upload an svg
to update the profile picture of the user.
The API commands used for the two actions are different:
UpdateUserAvatar
AddAttachment
The failure response of the API for AddAttachment
looks like this:
Check the two API commands implementation and figure out if it makes sense to take part of the logic used to process the svg image from UpdateUserAvatar
and share it with AddAttachment
command.
Convert the svg image into a png client-side using a library but I think this logic should be handled on the backend
📣 @AyoubMoujane! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: moujane.ayoub@hotmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~0126293d99c814e8f5
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@thesahindia will review proposals as they come in
SVGs can be uploaded and submitted at profile photo but submitting at comments returns an error.
Lines 318 to 322 of App/src/components/AvatarCropModal/AvatarCropModal.js
// Svg images are converted to a png blob to preserve transparency, so we need to update the
// image name and type accordingly.
const isSvg = props.imageType.includes('image/svg');
const imageName = isSvg ? 'fileName.png' : props.imageName;
const imageType = isSvg ? 'image/png' : props.imageType;
This SVG conversion to PNG is missing in the addAttachment
here.
Lines 863 to 871 of App/sec/pages/home/report/ReportActionCompose.js
addAttachment(file) {
// Since we're submitting the form here which should clear the composer
// We don't really care about saving the draft the user was typing
// We need to make sure an empty draft gets saved instead
this.debouncedSaveReportComment.cancel();
const comment = this.prepareCommentAndResetComposer();
Report.addAttachment(this.props.reportID, file, comment);
this.setTextInputShouldClear(false);
}
Check if the file is SVG and convert it to PNG in addAttachment
with the logic used in AvatarCropModal.js. However, this would show png on the recipient end.
@abekkala, it is a backend issue. It needs to be internal.
cc: @Gonals
Current assignee @thesahindia is eligible for the Internal assigner, not assigning anyone new.
I'll take a closer look tomorrow!
This seems to be working fine now both in staging and dev! Closing
@Gonals I'm still able to reproduce with SVG images. I have tried the below svg images.
You are right. Not sure why it worked with the one I had.
SVG is not supported by getImageSize
in PHP, so the only way to have it behave as an image (with its preview and whatnot) would be to change the format.
I think that, for attachment purposes, it'd be better to keep the file intact, displaying them as a link, like we do for documents or other files, instead of displaying the preview.
We can always change the code to show a PNG as the preview, but then download the actual file. In any case, that's some polish we can do down the line, but I'll wrap up a fix so we allow SVG attachments for now.
@Gonals is there any update on the internal fix for this one?
Oh! does this one require a payout? I see that the merged PR has gone to production but I'm not seeing any of the auto-updates irt payments??
[$250] Payment to @priya-zha
@priya-zha upwork contract offer sent: Payment Issue for E/App #19499 - Expensify
Offer accepted. Thanks
payment made and contract ended - thank you! 🎉
Confirmed with @Gonals: Internal fix and Internal PR review - no other payments needed
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Able to upload svg image on chat in a similar way how it works well on the profile picture
Actual Result:
Not able to upload svg image on chat but works well on profile picture
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.17.1 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/33691d28-6172-40da-99a0-3c21cee4aa52
https://github.com/Expensify/App/assets/43996225/e19b2925-aa36-435d-90f4-2976e231a5e5
Expensify/Expensify Issue URL: Issue reported by: @priya-zha Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684685097227669
View all open jobs on GitHub
Upwork Automation - Do Not Edit