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

Use filename of files exported from other apps to name media objects. #13173

Merged

Conversation

@SergioEstevao
Copy link
Contributor

SergioEstevao commented Jan 6, 2020

Fixes #13018

With this PR we will use the last path component to name the exported file. This will then be used to name the media asset when importing the url
to the media library.

To test:

  1. Choose an image from your iPhoto library and save to files. Select either iCloud Drive or On My iPad).Note: Make sure the file is a JPEG or PNG, by default the new iPhone devices save images on HEIC format that are not accepted directly in WordPress sites. To go around this you can go to Camera settings and select to save the photos in a "Compatible format"
  2. Rename the image and save.
  3. Open the WordPress app and go to Media > + to add a new image.
  4. Select 'Other Apps' to open files library (whether you select from On My iPad or iCloud Drive the same behaviour happens)
  5. Select the renamed image to add to your site.
  6. After it uploads, click on the image to verify file info, check that the file kept the original file name ( lowercased and without extension)

PR submission checklist:

  • I have considered adding unit tests where possible.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

This will then be used to name the media asset when importing the url
to the media library.
@SergioEstevao SergioEstevao added this to the 14.0 milestone Jan 6, 2020
@SergioEstevao SergioEstevao requested a review from etoledom Jan 6, 2020
@peril-wordpress-mobile

This comment has been minimized.

Copy link

peril-wordpress-mobile bot commented Jan 6, 2020

You can trigger an installable build for these changes by visiting CircleCI here.

Copy link
Contributor

etoledom left a comment

Working great! And thanks for the unit test 😁

Should we add an entry to release notes?
It's not a big change but still is a user-facing bug fix.

@SergioEstevao SergioEstevao merged commit 4304212 into develop Jan 8, 2020
7 checks passed
7 checks passed
Hound No violations found. Woof!
Peril All green. Jolly good show.
Details
ci/circleci: Build Tests Your tests passed on CircleCI!
Details
ci/circleci: Installable Build/Hold Your job is on hold on CircleCI!
Details
ci/circleci: UI Tests (iPad Air 3rd generation) Your tests passed on CircleCI!
Details
ci/circleci: UI Tests (iPhone 11) Your tests passed on CircleCI!
Details
ci/circleci: Unit Tests Your tests passed on CircleCI!
Details
@SergioEstevao SergioEstevao deleted the issue/13018_keep_name_of_files_imported_other_apps branch Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.