Zapier: How to post tweets from trello multiple attachments of images? - twitter

I am using a zapier zap to post tweet from trello card added to a specific list.
The description part goes to tweet text and attachment image goes to image of tweet.
In case of one image attachment works well. I use zapier formatter to extract an image url from trello card's attachment.
But I want to tweet more than 1 images. In that case zapier pass the multiple attachments as one zipped file contains attached images. So it fails to pass it to the twitter as invalid media format because it is zipped format but not image format just like .jpg, or .png.
How can I implement this?
Thank you in advance.

What you're describing is expected behavior in how the hydration process is handled for multiple images.
You might be able to use a third-party service like - https://zapier.com/apps/convertapi/integrations app to get these files unzipped within the editor.
With that said, afaik, unless you're creating your own private dev Twitter app, the main app only able to accept one image per post at the moment.

Related

Displaying Image in Image Attachment

According to the Slack API, if you provide a valid link to an image_url, that image will be displayed. I've tried this with the message builder here but no image is ever displayed. I also tried this using cURL, and once again the image doesn't display. Any idea how to get the image to display? This is for use in creating a bot to send notifications through an incoming webhook. Thanks!
Image of JSON and corresponding message preview:
They seam to be two problems with your example.
You can not use both image and thumb together in the same attachment. If you want to use both in your message, just create another attachment.
When using imgur you need to use the direct image link, not the imgur page link.
Here is a working example.

Errors Uploading Chunked Images to Twitter via OAuth.io

NB: a minimum-viable-example exists here, with text copied from below.
We are unable to reliably upload images to Twitter.
Twitter has a REST API endpoint for uploading chunked images. We are using OAuth.io (documentation here) to interact with Twitter. We are uploading the image as a base64 string.
If we upload an image in a single chunk, then the image uploads to Twitter without any problem. However, if we split the same image into multiple chunks, then Twitter may:
refuse to upload the image, informing us that the Segments do not add up to provided total file size once the FINALIZE command is called;
accept the the image, but display a corrupted image in the tweet.
The error behavior varies based on the individual file used and the chunk size of our upload. However, we have not been able to determine any viable rules to guarantee success, and certain files seem to be more error prone than others.
Without the ability to introspect what OAuth.io is POSTing or what Twitter is receiving, we are unable to determine where the problem may be occurring.
The code to demonstrate this behavior is quite long (~200 lines of JS, not including the base64 images or HTML). I've published a full working example here for people to interact with. The code from the example available on Github.

Slack Slash Command - inline image attachments

I'm making a cribbage app for our slack channel. It's played using Slash commands. I'm currently showing the player their hand when they type the /showHand command, and it works, but I'd really like to be able to inline the image attachments but I cannot find a way to do this. Currently, it looks like this:
And if I use thumbnails it looks like this:
Is there a better approach? Possibly a way to add multiple images to one attachment? Possibly a display option to display response attachments inline?
UPDATE:
I followed Szymon Roziewski's advice and created a server-side module to download the card images I needed and create the final image of the player's hand. The images are cached so they only need to be downloaded once during the lifetime of the dyno.
I also contacted Slack support and I was told that inlining image attachments isn't currently possible but they might make it a future feature.

Rails: upload a file OR store a url

I'm developing a form where I want to allow users to either upload a file, or enter a url to an existing file.
The idea is to allow users to attach various 'multimedia' files to entries, some of which may be files from their hard drives (think images, word documents, etc) and some may be urls (youtube videos, images on flickr, etc)
Any ideas on how I can accomplish this? I'm currently using carrierwave to handle file uploads, and it seems to work well, but I want to store url's as well.
What I will probably do is to have a drop down in the file upload form to select if the file is from the disk or from external url.
By default it will set to "from disk", and if they select external url, you could use some AJAX magic and hide the file upload text box and have a text box to use the external url/script etc..
in the table, you can keep another two columns,
1 - external url
2 - file category (external / uploaded file)
by that way you can distinguish the files and how they what to display in the view
HTH
Don't save the url unless you really have too. The thing is that when you save a url, you can't process it to create a thumbnail or multiple styles of the image. Also, when you display the images in a page you will have to make external calls and that can slow down the page or even worse, if the link breaks sometime in the future your users will see an empty image.
Which is also the case with youtube videos. However, with videos you typically want to store and display more information than just the video. You can have two tables - one for videos and one for images. In the video table you have title, desc, author, duration, embed code, thumbnail (image attachment).
You can download any image when a URL is given and save it like a normal file.
Using carrierwave -
#object.remote_image_url = "http://www.foo.com/file.png"
#object.save
In the view, you would have both options, perhaps side by side and you can let them post to different actions. So if a file is selected and posted you save it normally. If a url is entered, then you can check if it's a video site or not - if video, parse out the info using the video_info gem and store it. Otherwise just use the two lines above and save the url image.
Note
My answer doesn't discuss the quality / nature of user inputs. The likely-hood of someone entering an incorrect url is high in my opinion, so you want to wrap attempts to save the url as an image in a begin-rescue block and perhaps using JS limit the video domains to just a few websites which you will be able to parse.

Upload image and text data in iphone

Hi stackoverflow friends
I want to upload text along with image to the webserver. I saw so many examples for uploading images to webserver but nobody explains how to send text from a uitextField along with image.
All of them points this link
http://iphone.zcentric.com/2008/08/29/post-a-uiimage-to-the-web/
This link gives only how to upload images only. I want to send some text values along with this. Could you please send me some example code.
Any help is Appreciable
I recommend you try ASIHTTPRequest. It allows you to easily accomplish such a task. You can create a PHP file that will receive your data via POST - ASIHTTPRequest provides some easy to use methods for this.
See here.
you can Use Evernote API for this purpose

Resources