I am using the Dropbox REST API, and i am wondering if there is a way to list files in a folder with URL for each file? Or do I have to call the Media endpoint individually for each of them.
Take a look at their documentation for /media. You would need to loop through a list of files, but this should do the trick.
Related
I have files stored on google cloud storage. Google provides me a URL to access this files, but when I access this URL the file is auto downloaded. I wish to know if it is possible to remove or don't allow this auto download when we access the file URL. ;)
The download feature is handled by the client.
Calling the URL for an object stored in a bucket will return the object in the body of the HTTP request, and the client will choose what to do with this data.
If you use a web browser, the choice of downloading or not a file is usually given by the header Content-Type. In general, there are some MIME types that will be displayed on the browser itself (according to Chrome help, videos, images, PDFs and web pages will be displayed directly on the browser), while others will download directly.
To modify the MIME type of the files stored in a bucket, you must change it's metadata, so the browser will behave in the way you want.
As per the documentation, if I wish to upload only media without any metadata, the simple upload will do. And the documentation says:
So, as per the documentation, I formed the request as follows and the body of the request is binary data:
But I am not able to figure out where to set the parent directory information for the media being uploaded if the body is comprised of only media.
Do I need to submit two requests, one for metadata and one for media? For that, we are provided with the multipart upload.
Can anyone please help me with a working example of a simple upload?
The form-data section in this Postman docs page might help you with entering the file location.
I found a YouTube video on the subject too.
I am able to add a filepicker.io onto my website but I wish for there to be some sort of result display when the files are uploaded. Currently I only get a pop up with a statement of the location within filepicker API folder.
Is there a way to list on the website that contains the filepicker the results of the upload? Like what was uploaded and its size?
You can get information about the uploaded file, such as filename, mimetype, and size, by examining the FPFile object. You can also retrieve the same information and more by using the filepicker.stat() call.
I'm trying to upload/import a track to soundcloud via their api.
Right now, it looks like you can only upload an audio file, but you can only do it by POSTing the file data.
My question is, is it possible to import to soundcloud (through the api) from a URL?
sort of like they do here: http://importer.soundcloudlabs.com
but via the soundcloud api.
Any ideas? I don't really want to make this a 2 legged process (download audio file, then upload file data to soundcloud)
Thanks!
I don't think this is possible. On the importer, you'll probably find that behind the scenes, it's doing that two-step itself. User inputs url, back end server downloads file, then uploads to SoundCloud API.
For example I can access a twitter resource from the following
http://twitter.github.com/bootstrap/assets/css/bootstrap.css
When I try to access the 'raw' file from my own repository I get
https://raw.github.com/nodeninja/book/master/chapter02/bootstrap/public/stylesheets/docs.css
Which doesn't work correctly in a web page I'm guessing because of https. What's the correct way to do this link?
GitHub have a pages facility for doing this
http://help.github.com/pages/
This is what I wanted
http://nodeninja.github.com/book/chapter02/docs.css