WordPress-iOS
WordPress-iOS copied to clipboard
Copy the exported file to a temporary dir instead of the local Media dir
Description
Fix #23025. This PR supersedes #24570, to address the issue raised in https://github.com/wordpress-mobile/WordPress-iOS/pull/24570#discussion_r2136074822.
Testing instructions
Verify that issue #23025 is fixed on WP.com sites and self-hosted sites.
Verify that photos, GIFs, and videos can be uploaded.
| 1 Warning | |
|---|---|
| :warning: | This PR is assigned to the milestone 26.0. The due date for this milestone has already passed. Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished. |
Generated by :no_entry_sign: Danger
Quality Gate passed
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 27873 | |
| Version | PR #24595 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | c52ee05021dc8a5ed4b9176510e90a1ad6519e29 | |
| Installation URL | 4r35f5oaa730g |
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 27873 | |
| Version | PR #24595 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | c52ee05021dc8a5ed4b9176510e90a1ad6519e29 | |
| Installation URL | 2jghek33a4ja0 |
I suggest capturing the name of the file immediate after it's loaded from the item provider and passing it here:
@kean Do you mean adding this change on top of of this PR, or using your suggested change without this PR?
There is another non-user-facing issue, along with the issue of "-1" in the uploaded image. When uploading an image, two image files are copied to the "local media directory": "foo.png" and "foo-1.png", which I'd like to fix too. There is no reason to store unused large files in the app's sandbox.
I'd probably suggest implementing it as a new/alternative fix, if you agree, of course.
When uploading an image, two image files are copied to the "local media directory": "foo.png" and "foo-1.png", which I'd like to fix too.
That's a good idea as these could really add up. It needs to remove temporary files after processing and remove everything after upload. There may be some code already doing it.
When uploading an image, two image files are copied to the "local media directory": "foo.png" and "foo-1.png", which I'd like to fix too.
That's a good idea as these could really add up.
Sorry, I was not clear at all in my previous comment. The issue of duplicated image files in the "local media directory" is also fixed in this PR.
Considering this PR fixes the issue with the uploaded media file name, and the issue I mentioned above regarding having duplicated image files in the "local media directory", I think we can take this PR's changes for now?