DropBox API: File Browser Examples? - ruby

I'm using the DropBox API (Ruby) to allow users to browse their DropBox folders/files within my web app and select a file(s) to be referenced...I'll only be storing the URL of the file within my app. With that being said, does anyone have examples of a good file browser for use within my app? Thanks.

If you're just looking for minimalist example code, the Dropbox Ruby SDK comes with an example program called web_file_browser.rb that you might want to look at. It's very bare-bones, so you can't use it in your app directly, but it might help you get started.

Related

Share File using Nativescript Angular

I can't find anywhere in the documentation about sharing files. Does Nativescript have a built in way to share filesystem files? I.E. I can pass it a path and it'll open the menu to pick an app to share with and when that app is opened it has that file specified already attached?
I'm using a plugin already for this, but it's a bit finicky as in it attaches the file to an email, but fails to attach it to a text message. Also the plugin doesn't give a complete list of applications like the built in share does on the phone.
I can confirm Share File plugin works as I'm personally using it often.
If you face any issues, let's know when it fails / which app you are exactly trying to share the file with.

How to set up a different download folder for every single Slack channel?

I'm looking for a way to have a separate download folder for each Slack channel.
Slack official app doesn't give this opportunity, and devs aren't looking to implement it.
Any idea on how to setup something like this?
Nope. I also tried same before. but in reality you can't do this.
A quick heck around is use shortcake naming culture. For example if you have folder for codebase you can name folder as cd_1, cd_2, cd_3. For server folders name as ser_1, ser_2, ser_3.
So by doing this you can get benefit of folder sorting. All same folder will be visible at same location.

Allow people uploads files to same dropbox folder Ruby

I am very new to this, Sorry if this is a naive question. I've been through the ruby tutorial for Dropbox API. Still confused on where should I start.
My situation:
I am running a copyshop. And usually my customers either bring their usb sticks OR upload to gmail then download in my shop OR upload to dropbox then print thier docs/pdfs/fotos.
And one day a customer ask me if I know dropbox. I say YES, I know it. And he ask me if it's possible to share a folder with him, then he can put his files into the folder at home, then come to my shop, open it and print, neat!!
But...Other clients also want to use this service, and they don't want their files exposure to other people (maybe private fotos, secret business plan, important letters...etc). The other problem is I want to make those who do not have dropbox also could upload files to my Dropbox folder that they can come and print.
Why use dropbox is because it's free for till 18G. And When the customer comes to print, I can remove the files, so 2-10G will be enough for 1-3 days buffering.
What I am thinking is to implement a website that allows people to upload DOCs/PDFs/Photos and save these files to my dropbox folder.
For people who have dropbox accounts, they will have a folder called copyshop in their dropbox folder, and they drop files as they usually do. And I will have a folder App/copyshop/ , each one puts files in their copyshop folder will appears in my dropbox as a sub-folder under my App/copyshop folder, e.g. App/copyshop/Tom , App/copyshop/Mary ...etc.
For non-dropboxers they can take advantage of uploading to my website, then save it to my dropbox folder.
Is this possible with Dropbox API? From the official statement:
The API provides methods to read and write from Dropbox securely, so your users can bring all their important files with them to your app. Any changes they make will be saved back to all their computers, tablets and mobile phones.
It looks like not a recommendation way to do it.
Thank you! Every reply is appreciate.
if you make a site to upload files there is no need for dropbox, just let them upload to a map that is available in the shop.
To make it safe with dropbox would be a lot of work, i suppose customers don't want their files exposed to others, only suitable for regular customers, for occasional customers the best method i can think of is let them make a public link of a dropbox file and send it to you.
Another drawback of dropbox is that the size of shared files is added to both the the sharer and the shared so you could get in trouble with the limits.
You could also make a script that monitors a public dropboxfolder and immediately on arrival moves the files to a safe location not accessible from others.
I suppose FTP would be better manageable, you could give big customers their own map and password and occasional users a just-write, don't read the upload of others security.
Answer from the dropboxer,
Yes, this would be possible. There are a number of ways you might do this, and the method you choose will be up to you, so I'll just touch on a few.
Without even using the API, you could have your customers enable and use this feature to send you a read-only link to any file or folder in their Dropbox:
https://www.dropbox.com/help/167
This isn't a shared folder exactly, but it sounds like it should be sufficient.
You could use the API to build an app that would essentially do 1, but help them along with it. Essentially, you would have them authorize your app, and then let them select a file or folder, on which you would call /files (GET) (or /shares if that is more convenient for whatever reason) to download or share the files.
Hope this helps!
Greg

ClickOnce and application data

I am trying to deploy an application using ClickOnce. The problem is, I am saving user generated files in the application's working directory. Now when the user installs the next version of the application, his old files will no longer be available to him. What is the best workaround for this problem - or does this mean I have to roll my own installer!
thanks!
Look into using isolated storage rather than the application's working directory.
This post should help you out.
When Windows Vista came out and developers could no longer store data in Program Files, Microsoft recommended using LocalApplicationData. We store a lot of cached data there, under a folder with our application's name. I wrote a blog entry showing exactly how to do this if you're interested. I call it Where do I put my data to keep it safe from ClickOnce updates?

How to create a Coda plug-in which creates a new site?

I'm using Coda for web developement. I often create new sites in my ~/Sites folder. I always enter the same information in Coda, except for the name of the site, and the directory where it's stored. Is it possible to create a plug-in (in either Cocoa or ShellScript) which automates this (so I don't need to enter all FTP stuff etc... over and over again)?
Thanks in advance.
One easy way to do it: just make a generic site with the things you normally type in. Then
when you want to create a new site, right-click on the generic site and say duplicate. There's no shell script you can write for the process, because you would need access to Coda's inner workings.
#Joshua I think Koning is talking about the process of creating a 'Site' within Coda itself, which looks like this:
http://andrewcerniglia.com/blogImages/77437/Coda_addSiteFTP.jpg
There's a plugin for that. It should do what you're looking for. If it doesn't, a similarly-worded Google search turns up this Coda plugin development page.

Resources