Bug 157291 - File Upload: Photo upload name is always generic (image.jpg)
Summary: File Upload: Photo upload name is always generic (image.jpg)
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jiewen Tan
Keywords: InRadar
Depends on:
Reported: 2016-05-02 18:12 PDT by Jiewen Tan
Modified: 2016-05-03 18:03 PDT (History)
4 users (show)

See Also:

Patch (7.01 KB, patch)
2016-05-02 18:21 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff
Patch (7.98 KB, patch)
2016-05-02 20:48 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2016-05-02 18:12:09 PDT
File Upload: Photo upload name is always generic (image.jpg)
Comment 1 Jiewen Tan 2016-05-02 18:12:40 PDT
Comment 2 Jiewen Tan 2016-05-02 18:21:34 PDT
Created attachment 277957 [details]
Comment 3 Joseph Pecoraro 2016-05-02 18:45:44 PDT
Comment on attachment 277957 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=277957&action=review

Rest of the patch looks good to me.

> Source/WebKit2/Platform/spi/ios/PhotosSPI.h:34
> +
> +#import <Photos/Photos_Private.h>
> +
> +#endif

Seems this should be defining the SPI if someone is building without the Internal SDK. Something like:


@class PHAssetOriginalMetadataProperties;

@interface PHAsset ()
- (PHAssetOriginalMetadataProperties *)originalMetadataProperties;
- (void)fetchPropertySetsIfNeeded;


Whatever is enough to get the iso-sim bot building!

> Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:739
> +        [result[0] fetchPropertySetsIfNeeded];
> +        NSString *originalFilename = [[result[0] originalMetadataProperties] originalFilename];
> +        ASSERT(originalFilename);

This code is doing a lot of result[0], which is probably non-optimal. Could that be stored into a temporary variable?

PHAsset *firstAsset = result[0];
Comment 4 Jiewen Tan 2016-05-02 20:48:34 PDT
Created attachment 277970 [details]
Comment 5 WebKit Commit Bot 2016-05-03 18:03:19 PDT
Comment on attachment 277970 [details]

Clearing flags on attachment: 277970

Committed r200395: <http://trac.webkit.org/changeset/200395>
Comment 6 WebKit Commit Bot 2016-05-03 18:03:23 PDT
All reviewed patches have been landed.  Closing bug.