Hi I have read the docs here:
http://www.tumblr.com/docs/en/api/v2#posting
I know how to upload one pic via the The photo 'source' URL parameter. like:
source: 'http://www.example.com/example.jpg'
How can I upload several pics in one photo post?
Thanks a lot!
Did you see this on the API page link for photo uploads?
data Array (URL-encoded binary contents) Limit: 5 MB
You would pass in an array containing the image links containing the multiple values as data instead of a single source file.
Related
Is it possible to upload and crop multiple images using Cloudinary (Javascript/React-JS) ?
Any help shall be greatly appreciated.
Thanks
If you're using the Upload API, you can upload multiple files in succession and send the cropping coordinates for each in the custom_coordinates property: https://cloudinary.com/documentation/image_upload_api_reference#upload_optional_parameters
I assume from your question that you're not uploading directly though, and are using the Upload Widget on your page.
If so, the cropping interface only works when uploading a single file, so to upload multiple files and let the user choose crop coordinates for each, you'll need to open the widget multiple times in succession: https://cloudinary.com/documentation/upload_widget_reference#cropping_parameters
I study the phoenix, create an application that loads the image on aws s3, and then displays it. I was able to upload the image to the cloud, but now it is not clear how to display it to the user on the page (I do not want to make public link to these images in the cloud). I was looking for information on this issue, but did not find anything useful.
From the clouds I get the file as binary data. Do I need to create some of these data is a temporary file that will be displayed on the page? I can display the image as base64, but I think this is not the best way. I would appreciate advice.
Since you've already fetched the image to a binary, you can just send it directly to the client with the appropriate content type and the browser will render it as an image. For example, to fetch and send the png at https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png:
def index(conn, _params) do
image = HTTPoison.get!("https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png").body
conn
|> put_resp_header("content-type", "image/png")
|> send_resp(200, image)
end
If you open this in your browser, you'll see the image being rendered correctly because of the content-type header.
I'm developing a simple web app and I just want to allow the user to upload some pictures.
should I just store the picture url on my database table or should I upload the whole picture?
how can I validate the size of the picture being uploaded?
how can I upload the picture from my controller?
thank you all!
I would NOT store the image data in the database. I would create a Behavior that will upload the image to the image directory and store a reference to that image. The behavior can then handle size, mime type, etc. Then add a file upload form to the controller and when the data goes to the model to be saved, it will automatically upload the image and put it where it goes.
If you do not want to build your own, here is a very popular behavior that someone has built.
https://github.com/jrbasso/MeioUpload
Or you could try this simple way of doing it (check the readme.md file) :
https://github.com/malikov/cakephp2.0-image-upload
I'm developing an application and I'd like to list the images present in the "Documents" directory of my application (to load images using iTunes) and I'd like to list the images and photos taken by the Camera as well.
And I do know about UIImagePickerController, but I don't need that. I want to integrate the photos and the loaded application images in the same place. But I can't find any information about where can I find all the device camera photos.
Thanks in advance
You can access all the photos stored in the photo library using the Assets Library Framework. Check out the documentation here:
https://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/AssetsLibraryFramework/_index.html
Specifically, you want to use ALAssetsLibrary's enumerateGroupsWithTypes:usingBlock:failureBlock: to enumerate the ALAssetsGroupSavedPhotos type, and enumerate the photos in that group with ALAssetGroup's enumerateAssetsUsingBlock:.
Some links with sample code:
http://www.icodeblog.com/2010/07/08/asset-libraries-and-blocks-in-ios-4/
http://www.fiveminutes.eu/accessing-photo-library-using-assets-library-framework-on-iphone/
I want to download all my favorited photos from VK, but I couldn't find suitable method in documentation. User's faves are not album and it makes troubles. Is there a way to do what I want?
You should use method fave.getPhotos to get pictures available here.
Access items from response and extract picture link from fields photo_807, photo_604, photo_130 or photo_75 dependent on which size do you need.
You can download images using the links extracted.
https://vk.com/dev/fave.getPhotos?params[photo_sizes]=0¶ms[v]=5.67