I'm currently try to find a solution to change WebSockets to an alternative way with less overhead for file upload. As far as I know, SSE can only download from the server, not reverse. Is there a solution to upload a file to the serve that is not WebSocket?
File upload has been part of the web since the dawn of time. (Okay, I'm exaggerating: form-based file upload was added as a supplemental to HTML 2, in November 1995: RFC 1867, if you are interested.)
The browser takes care of the encoding, and it will be as efficient as it can be.
Most server-side languages have some helper functions for dealing with the uploaded files. And there are client-side javascript libraries that will give you a more friendly UI than the basic html form. They are often using AJAX to give you an asynchronous file upload, that won't block the user interface.
If you search for "file upload using ajax" you will find plenty of tutorials and sample code.
Related
Is there a way to download file directly from dropbox without logging in. I find this to be a serious limitation. I want to link a few files from website. Can this be done in dropbox?
I realise this can be done with an api (at least in theory) but I have no idea what the link should look like. Cheers.
If you have a Dropbox shared link for a file that can be accessed publicly, you can download from it programmatically.
You can download directly using the link as documented here:
https://www.dropbox.com/help/desktop-web/force-download
Or, you can use the API via the /2/sharing/get_shared_link_file endpoint:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file
How to access (read/write) advanced file metadata in the Dropbox JavaScript API?
I'm talking about things like e.g.: MacOS file tags. Or the camera model inside the EXIF data.
Please note that dbx.filesGetMetadata(arg) does not provide very detailed metadata... Almost only dropbox specific metadata actually.
Any ideas?
Kudos to Greg.
The Dropbox API unfortunately doesn't natively return Mac OS file metadata/xattrs, or the full EXIF information for a file. The Dropbox API currently only natively returns a few pieces of basic media information in FilesFileMetadata.media_info, e.g., if you set FilesGetMetadataArg.include_media_info to true when calling filesGetMetadata or filesListFolder/filesListFolderContinue.
To get any other metadata embedded in the file content, you'll need to download the file content and parse it out client-side.
Did anyone know a way to send a file to a Dropbox Account through VBA?
It can be a documentation, a link to an API, anything.
I've tried on google but can't find anything.
You should be able to use the dropbox core api, which is all Http requests. For uploading, see specifically using put and using POST. You can do http requests in VBA. For some reason I'm having a bit of trouble finding an official msdn/windows language reference. But here are some helpful examples:
excel vba http request download data from yahoo finance
http://tkang.blogspot.com/2010/09/sending-http-post-request-with-vba.html
http://social.msdn.microsoft.com/Forums/office/en-US/ac1c6f10-3d41-4f15-9711-fd78b74f17ad/winhttprequest?forum=exceldev
That should get you started. Just note that dropbox only accepts UTF-8 strings, which isn't usually Windows's specialty. So make sure you're sending strings in the right encoding.
Is it possible to upload files to Rackspace Files Cloud from browser like in Amazon S3?
If you are speaking about uploading via the browser then you can use https://manage.rackspacecloud.com/ which has a nice web interface to upload your files.
If you want to have an API call from the browser since the API is all in REST it should not be too hard to implement it in JavaScript, I haven't seen any library/binding in JavaScript but this should be pretty straightforward to do straight with jQuery or such, see this SO article for some examples :
JavaScript REST client Library
and this is a link for the REST documentation of Rackspace CloudFiles :
http://docs.rackspacecloud.com/files/api/cf-devguide-latest.pdf
I have a javascript -> c# array parser that I would like to feed with some .js files from the internet, so what I'd like is to download those files and have the interpreter run them through. Only problem is that I can't do this since there is no crossdomainpolicy on the sites that I dl from, but I don't get why that should be an obstacle. I Can retrieve the js from just browsing to it in my browser, so why can't I retrieve the exact same text from code for further processing? how can I get to download the js files from the web?
Why don't you just upload copies of those js files to your website?
The cross-domain block is probably a function of the browser to prevent such actions that basically end up as phishing sites or some other kind of nefarious hack. But it should work just fine if you put copies of the js files on your own website.