Upload a Dropbox file to InkFilepicker - dropbox

I'm trying to upload a file using the Dropbox API to Ink Filepicker, but I can't find any documentation on doing things like this.
It's done in the backend using Ruby rather than with the Javascript frontend because it needs to automatically upload new photos (Specifically inside the '/Camera_Uploads' folder) as they're added.
Has anyone had experience with doing something like that? One solution I saw was sharing the file, and then uploading them with the Filepicker REST API, but that seems like a bad way to approach this.

I think that your approach of sending a URL to File Picker is a good one, but I would suggest using a media link instead of a share link. Media links expire after four hours, so they're a good alternative to permanently sharing a file.
In Ruby, the method you want is DropboxClient.media.

Related

Upload Image To Cloudinary Using Java API

I am using cloudinary API with JAVA. We have a requirement to upload images with an auto increasing number automatically. Like 1.jpg, 2.jpg, 3.jpg...
When I upload the first image(abc.jpg) so it would become 1.jpg.
When I upload the second image(xyz.jpg) so it would become 2.jpg. Same for others.
does cloudinary provide any kind of solution for this situation?
This is not supported, this is something that you need to manage by yourself.
Maybe you can rename any uploaded image after receiving the notification URL on your server, but you need to keep in mind stuff like async actions...
Best,
Yakir

Meteor Amazon S3 image upload with thumbnails

I'm using Meteor and would like to create a form with an image upload field that saves the uploaded file to an Amazon S3 bucket in its original size as well as multiple thumbnails sizes defined (passed) via the code.
So far I'm using the lepozepo:s3 package which works great but doesn't seem to allow options for generating additional thumbnails.
Given I can upload the original files onto S3 I'm considering looking into a service on Amazon that can generate the desired thumbnails and then notify my Meteor app. But I'm not sure how to achieve that.
Can anyone point me in the right direction or share some insight into the best approach for this?
PS: I want to avoid using Filepicker.io is possible.
Seems I was following the wrong path. CollectionFS has everything I need and more. I now have this working with plenty of scope to do more later. This is one brilliant collection of packages with clear guides on respective Github pages.
Here are the packages I ended up usings:
cfs:standard-packages - base
cfs:gridfs - required for some reason, not sure why
cfs:graphicsmagick - thumbnailing/cropping
cfs:s3 - S3 upload
Code sample →
CollectionFS is now deprecated, but there are other options:
Only upload, without S3 integration*: https://github.com/tomitrescak/meteor-uploads
Use the jQuery-File-Upload (which is great), it generates thumbs, has size and format validation, etc. Using basically these two packages together:
https://atmospherejs.com/tomi/upload-jquery
https://atmospherejs.com/tomi/upload-server
You can use other package for S3 integration.
Like: https://github.com/peerlibrary/meteor-aws-sdk/
Upload + Integration with S3: https://github.com/Lepozepo/S3
Good, but if you need to generate thumbs for example you will need to integrate with other package or do it yourself. I not tested, but I got this suggestion: https://github.com/jamgold/cropuploader
Upload only, but with examples of how to generate thumbs or integrate with S3 / DropBox / GridFS /: https://github.com/VeliovGroup/Meteor-Files/
Rich documentation and does well which proposes: Upload images.
Use that adapt best to your needs.
look at blueimp's "jquery file upload" for client and image server resizing. On client you have a bit limited possibilities quality wise, on server you can use full power of imagemagick. Or look at my blog post on http://doctorllama.wordpress.com for file uploads for meteor in general.
cfs:gridfs - required for some reason, not sure why
Meteor using gridfs to store file chunks inside mongo database. In case of s3 it's for temporary storage.

Upload and share image on Google+

I can't seem to find any documentation or reference on upload and sharing images on Google+.
Is this action current supported in google+?
Their moment sharing seems to accept thumbnail url, but I don't want to keep the image hosted on my site once it is created and shared by visitor.
You have a few different options, but I'm not sure any of them are really what you're looking for.
Google+ doesn't really allow outside apps to upload and share something automatically.
As you've observed, the closest you can get is generating a Moment for them to share. And while there are similarities to Instant Upload, it isn't identical. You could probably use a data url to encode and store the image as part of the moment, but I haven't tested this.
Another alternative is to use the Google Drive API to store the image in their Drive space, permit the image to be read publicly, get a link for it, and use this link as the thumbnail URL. Similarly, you might be able to use the Picasa Web Albums Data API to store the image. Both have good, but different, integration with Google+. The former is more modern, while the latter has more features that are tailored for images.

Upload Progress in Wicket for MultiFileUploadField

Wickets UploadProgressBar does only work for 'FileUploadField'. This is insufficient for my needs as I need to transfer multiple files which will be added by the User (Just like it can be done with 'MultipleUploadField').
So I'd like to implement an UploadProgressBar which also works for the MultipleUploadField but don't know what would be the best approach to do this. I recognized the classes UploadInfo and UploadStatusResource which might be useful here.
Does anyone have a suggestion what would be the best way to solve this problem?
Have a look at Uploadify at www.uploadify.com, which uses Flash to upload multiple files. You can integrate its Javascript callbacks nicely into Wicket, using Wicket's JS features.
It brings a nice progress bar for each single file upload.
Or you can wait for HTML 5.
Meanwhile you can also check for a better Javscript library for multiple file uploads and again integrate it in Wicket.

Multiple files upload chosen in the same browse file window (Ruby on Rails)

I've searched for "multiple files upload in ruby on rails" and the plugins that were suggested always displayed multiple <input type="file" ...> tags. I'm looking for something where I can choose multiple files in the same browse file window, like when uploading photos on facebook.
I've found this one, but it requires some under-the-hood coding to be used in RoR (it is ready for PHP).
My requirements are really basic: I only need to be able to upload files facebook-like. No visual effects needed, or progress bars or whatever. So maybe I'm thinking about implementing my own uploader, but I don't know where to start.
So if you got either 1) a suggestion of RoR plugin that might do what I just described or 2) tips on how to implement one myself, I'd be very glad to hear them.
I've heard good things about Plupload and, to a lesser extent, Uploadify. The former uses a variety of techniques transparently to try and achieve multi-file upload (using the HTML5 API if possible); the latter only supports Flash (though this is what many users will end up using).
Integrating these with Rails is just a matter of implementing the API they expect, which is fairly straightforward.
Here is a post by someone who has taken the effort of making sure CSRF protection and Flash session cookies even co-operate. http://planetrails.com/plupload-with-rails-3
I have not followed that particular guide myself, but it seems correct.
I've had good success with the jQuery File Upload Plugin. It uses both the HTML5 "multiple" attribute for file inputs and drag-and-drop uploading.
If you're using paperclip and jQuery, you can get it integrated in your app pretty quickly.