Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to upload File from URL
    primarykey
    data
    text
    <p>In my application am allowing the user to upload file from the URL</p> <p>code to upload File URL:</p> <pre><code>function loadURL(box) { var box = dhtmlx.modalbox({ title: "Load URL", text: "&lt;div id='form_in_box'&gt;&lt;div&gt;Enter the URL of PDF file &lt;hr/&gt;&lt;input type='text' name='files' id='files' style='width: 400px; height: 27px;'&gt;&lt;/label&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;span class='dhtmlx_button'&gt;&lt;input type='submit' value='Load URL' style='width: 86px' onclick='load_file(this)'&gt;&lt;/span&gt;&lt;span class='dhtmlx_button'&gt;&lt;input type='button' value='Cancel' onclick='close_file(this)' style='width:80px;'&gt;&lt;/span&gt;&lt;/label&gt;&lt;/div&gt;&lt;/div&gt;", width: "300px" }) } function load_file(box) { var file = document.getElementById('files'); if (file == "") { alert("Enter File URL"); return false; } file = file.value; var filename = file.substring(file.lastIndexOf('/') + 1); dhtmlx.modalbox.hide(box); $.post("/FileUpload/UploadURL", { file: '' + file + '' }); </code></pre> <p>} </p> <p>Controller code </p> <pre><code>public ActionResult UploadURL(string file) { string files = Path.GetFileName(file); string myStringWebResource = ""; WebClient myWebClient = new WebClient(); myStringWebResource = file; string path = Server.MapPath(_fileUploadPath + files); myWebClient.DownloadFile(myStringWebResource, path); string extFile = Server.MapPath(_fileUploadPath + files); return View(); } </code></pre> <p>Files are gettinig downloaded successfully. Now I want to upload the same file How can I do so?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload