Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6602859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:55:43+00:00 2026-05-25T18:55:43+00:00

I have an app which allows me to drag items from my web browser

  • 0

I have an app which allows me to drag items from my web browser to the app dock icon.

When I drag an image from the web and get is raw data with [pBoardItem dataForType:NSPasteboardTypePNG];
I get the raw image data which I need but I also need to know the location of the image form where it was taken (ie. http://www.somedomain.com/somedir/someimage.png ) OR if its local (/Users/somedude/photos/myphoto.png).

How do I get the path location information?

Thanks in advance.

[EDIT** removed an erroneous comment I made regarding stringForType here]

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:55:44+00:00Added an answer on May 25, 2026 at 6:55 pm

    Nothing’s on the pasteboard that wasn’t put there by its owner (the app that copied to it).

    Look for NSFilenamesPboardType and/or NSURLPboardType on the pasteboard.

    If they aren’t there, only an image was copied, without a path or URL. This is completely possible and valid, as in the case of a section of an image copied from Preview or an image editor, and it’s also completely possible for an application to simply not put the path or URL on the pasteboard, so don’t expect that an image will necessarily come with a path or URL.

    when I use the stringForType: function I only get public.png (the name pasteboard gave it temporarily).

    Er? Are you saying that when you asked for a string for some type, the string you got back was @"public.png"?

    If so, that has nothing to do with an image on the pasteboard; @"public.png" would be the contents of the pasteboard. Perhaps you had just copied “public.png” to the clipboard yourself?

    If you meant that you retrieved a string for the type @"public.png", (1) that isn’t a temporary name, it’s the UTI for PNG, (2) you should use the named constants, such as kUTTypePNG, in preference to hard-coded literals, and (3) the value for that type should never be a string. I wouldn’t expect to get anything useful from a stringForType: message with that type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app(jsp/servlets) which allows users to download audio files and play
We have an ASP.NET MVC web app which allows users to publish messages onto
I have a simple CoreData app which allows you to add items to a
I have an app which is displaying a data set which allows me to
I have made app which allows me to send message to multiple user from
I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process
I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process
I have a flex app which allows user to create some content. this content
I have an app which could benefit from the user being able to choose
I have certain sound files and will like to develop an app which allows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.