Upload File Using Url to Box content-api - javascript

I did some research and i couldn't find any information regarding this,
I know that box content-api call to upload needs to be form-data
is there way to upload file via giving a url of the file?
like for example i want to save this file,
https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png
without downloading it on to the computer (client side). and than uploading it with api.

It is not currently possible to upload a file with the Box API using a URL to a file.
When calling the Upload File endpoint for the Box API, you have to specify the file's location on your local machine or server.

Related

upload a file inUI in the UI Browser If the user wants to check the file should be able to download it

Hi I am using the #myfile to select the file to upload it in the backend but before uploading it in the db or server i want to download it and check whether it is the same file or not so how can i download the file I am using formData to store the file data using JavaScript .

How to download to server rather than client a Google drive file converted to PDF?

I am using "The Google Picker API" with asp.net web application to retrieve a file saved in Google drive and convert it to PDF using google export, then I want to save the PDF file to web server
I am getting the download link of Google drive file converted to PDF in this format
https://docs.google.com/spreadsheets/d/**an-id-here***/export?format=pdf
The link is working fine and I'm getting the file downloaded.
But I want to save the file to my wb server using a http handler which I am calling from javascript
When I send the download link to the Htpp handler, the file saved to the server is corrupted
But when I use a url like this one
http://www.africau.edu/images/default/sample.pdf
the file is saved correctly to my web server
I'm using this code to save the pdf fil into the server
Using client = New System.Net.WebClient()
client.DownloadFile(url, tofile)
End Using
My question is:
is there a way to get url for the pdf file rather then a download link
Or if not possible, is there a way to save the file into the web server using this download link ?

How to provide PHP script with the absolute path for file upload?

I am trying to develop a web application that uses a third party API that requires the local file path of a video file for upload to their server(third party server).
Their PHP upload function requires the local path of a video file:
public function upload($file_path)
My understanding is that I cannot get javascript to provide me with the local file path. My questions is how do I go about providing the PHP script with this local file path for the video upload.
I know that I can upload the file to my own server using $_FILES['myfile']on the PHP side for instances, but since I am uploading to a third party server I need to get hold of the local file path. Is there a solution for this? I've been stuck on this problem for a few days and I am at a total loss.

How to upload file to the page path?

I search it every where but not found right answer, I'm trying to upload file using jQuery plugin, But I don't know to where file save when I upload file using this plugin.
My need is when file upload it save automatically to the page path.
Plugin Url:
http://hayageek.com/docs/jquery-upload-file.php
Demo Here
To upload a file to a website you need a server listening to request on the end. Jquery can be used to simplify getting the file to the server but once there the server has to accept it and copy it to the hard drive. Think about it like this, it would be a real problem if anyone could post anything to your server and have it be copied to your server. Hope this helps, or at least points you in the right direction.

jQueryFileUpload upload a file given its URL

I'd like to use jQueryFileUpload to upload a file that is not on my computer but rather is at an external website so all I have is its URL, e.g., https://dl.dropboxusercontent.com/s/wkfr8d04dhgbd86/onarborLogo64.png.
I'm at a total loss on how to do this but I think it involves adding the file data programmatically rather than using the traditional <label for='myComputerFiles'>-based selection of files.
If this is correct, what next FileReader()?
Any thoughts would be appreciated.
You should do this on the server - it requires user intervention to download it locally, and that just seems hacky and unfriendly.
Reason? You would have to first download the file (which is an indeterminate process), and then upload it to the server. If you pass the URL to the server then it can perform the whole process in 1 action - a download (which is effectively the same as you uploading it). Also, the ability to read local files, which is what FileReader is for, does not mean you should download files to just upload them again. That's bad logic and your users will not appreciate it.
Also, Dropbox Chooser is not meant to be a way to download files. It's meant to be a replacement for downloading file, or uploading them to other servers... ...without having to worry about the complexities of implementing a file browser, authentication, or managing uploads and storage.
Since you're using S3, if there is an API call on S3 that allows you to specify a URL then that would be the most obvious thing to use. If you can't do that then you either need to download the file for the user (onto your server) and then upload the file to S3, or you're back to the original idea of downloading at the client and uploading from there. Either way, the introduction of S3 obviously adds another layer of complication, but I'd initially look at getting a URL from the client and getting that file on my server so I could do anything I wanted after that.
This previous question may be of some help in this area...
How to upload files directly to Amazon S3 from a remote server?

Categories