Get url from images stored in Parse - ios

How can I fetch the URL from images stored in Parse?
I have made an app where I can store images into Parse (works fine).
But how do I retrieve the URL from the image stored in Parse so I can show it in a web browser by typing the URL?
Can I see the URL for the images stored in Parse anywhere?
I'm thinking something like this:
https://www.parse.com/apps/ClassName/collections#class/Photo/CzEgPXalzM

You can get the url of the image from the PFFile object containing the image like this:
NSString *urlString = yourImageFileFromParse.url;

Related

UIImage to NSURL

I have generated an image in my app an I would like to share it via UIDocumentInteractionController which takes an argument in form of NSURL. Of course I don't want do directly convert image data into a URL, but what is the best way to achieve this? Can you temporarily store that image somewhere and then get the url and delete it afterwards after UIDocumentInteractionController has done it's job? Or convert it to NSData somehow and then get the url of the NSData object? (I tried this and failed btw)

Accessing and Sending raw image data to API

I need to be able to access the raw image data from a loaded photo. Originally we were supposed to use Base64, however the API creator has changed it to raw image data.
In SWIFT, how would I accomplish the following?
I'm currently using Alamofire for my networking, but I'm not sure that it will work for this part of the API.
I already have the image resource as a variable to access, I just need to know how to get the raw data, and then formulate a POST request with just that data as the body of the request. A method with a callback would be awesome.
UIImagePNGRepresentation
UIImageJPEGRepresentation
These method can encode a UIImage to NSData.
upload code:
Alamofire.upload(.POST, "http://your.org/upload", data: imageData)

Create An AVPlayer from raw data or save video to PFFile in different format

I am currently working with the 3rd party library SCRecorder to try and create an AVAsset with a URL and then create an AVPlayerItem -> AVPlayer to output a video.
I believe my problem arises because the video data I am trying to play is originally being saved to Parse as a raw data file. The reference URL to this file is in the format "http ://files.parsetfss.com/something-file". It does not appear that there is a way to create an AVAsset, and ultimately an AVPlayer, using this type of URL.
My question is whether or not there is a way to create an AVPlayerItem/AVPlayer using this URL which returns raw data, or create one using the raw data itself as an NSData? If this is not possible is there a way to save a PFFile to Parse in a different format, one that would be accepted by AVAsset/AVPlayer such as .mov/.mp4?
I figured out the issue... I just needed to use PFFile(data: data, contentType: "video/mp4") :P

Box: Getting image url for sharing

Currently sharedLink url for a file is of html type.
How can I directly get image url to share instead of getting url of html type.
Currently I'm getting below url as sharedLink for an image, which is of html type
https://app.box.com/s/53auzqp2sdx2ki9dl8kw
How can I directly get url with image extension as below, which I got by inspecting above link in browser.
https://app.box.com/representation/file_version_20217702945/image_2048_jpg/1.jpg?shared_name=53auzqp2sdx2ki9dl8kw

Feed Aggregator in Rails which can grab image

Im newbie. What Feed Aggregator available in Rails which can grab one image (largest image) from the source URL?
You could:
parse the feed with SimpleRSS
get the picture's url
store the image with the method described here (using paperclip):
Save image from URL by paperclip

Resources