I have a website wich allows users to upload / downloads files (pdf, jpg, txt, etc.). It works nice as it is, but my problem is that users accesing the web on an iPhone (or iPad) can't dowload or access the file. I've tried to use "Respone.Redirect" to the file, but it doesn't work. I've use c# to make my website.
Do you have a piece of code i can use to make it work?
This is the code i'm using but doesn't work:
if (Request.UserAgent.ToLower().Contains("iphone") || Request.UserAgent.ToLower().Contains("ipad"))
{
Response.Redirect(Server.MapPath(fi.FullName.ToUpper()));
}
Thank you.
I don't think the problem is with your code so much as with the phone.
How to download PDF and store it locally on iPhone?
Related
My asp.net web application is some kind of "document managment system" saving files in the file system of the server.
The stored files are shown in an asp:ListView control and are downloadable as HTTP- Download. But I also want to drag&drop them into another browser window to upload the draged file to an cloud storeage like dropbox or google drive oslt.
I did some research and I didn't find any solution for this problem. I don't know if this is even possible. Maybe someone has an idea how this could be done?
I am pretty sure you can't have a web application doing that for you because it involves having your web language interacting with your computer, to move a local file to another window or tab in the browser.
It would be similar to have Javascript accessing your local files without the user "help". That is not allowed.
Rather than doing that, why not connect to Google Drive or Dropbox API and make the upload yourself?
In the piece of code where you trigger the download, you could also trigger an upload to the desired service.
Here are the API Documentation for the mentioned services:
https://www.dropbox.com/developers/documentation/http/documentation#file_requests-create
https://developers.google.com/drive/api/v3/manage-uploads
If a user has a problem with our UWP app that I can't reproduce, I want to give the user a button, so she can upload the sqlite database to somewhere where I can access it. The zipped database could be up to 160 MB.
My question is where is the easiest place to upload a large file to using UWP. Pushbullet, OneDrive, Dropbox? Or I could FTP it to somewhere (am about to try this out FtpClient). I've noticed that Chilkat can help with this, but it's not free.
My question is where is the easiest place to upload a large file to using UWP.
The better way is using OneDrive to upload sqlite database. It has enough memory capacity, And you could easily use OneDrive API in the uwp app. This is OneDrive Service you could refer.
And this is code sample.
I am developing a web application in C#.net. I need to edit a file placed on the server in browser it self(Without downloading it on local machine) and when I save that file, the changes should be reflected in file. For this I want to use google API but I don't know how can I use this.
I want to do like below.
When I click on file name, it should open in browser.
When clicked on edit, it open in edit mode in browser using google doc.
When I save that file, the changes should be reflected in my file which is placed on company server.
How can I do all this thing with google doc API?
Install Google Drive on your server.
Edit the file in Google docs, let Google Drive sync it to the local hard drive.
It is not possible for HTTP protocol, because the basics system doesn;t support it. You can open the file but the file will be downloaded to your local machine in then it will open, you have to specify the MIME type in IIS.
You can use two ways to do a similar job done.
1 By Using FTP
2 Customized solution : Make a page put a text field and load the file (.cs) in it and with submit save it to the file back.
You can embed a google doc in Webpages. But the file would be accessed and saved on Google's servers and not your company server:
Wordpress allows you to do it. Potentially you can see if it possible to do it in a similar way:
http://en.support.wordpress.com/google-docs/
I am not sure if Google has an option of accessing docs from servers outside google's domain.
How can i search and download local disk files from web?
some codes available for searching local disk files by C#. but not web based....
please help me friends for searching algorithm..
Thanks,
regards,
Raj.
I can suggest you some asp.net web File Browsers, like ckfinder and a source code from codeproject.
http://ckfinder.com/
http://www.codeproject.com/Articles/301328/ASP-NETUser-Control-File-Browser
From the moment you select your file, you can simple click on it to get it, or use a http handler to send it to the client.
I would like to upload file from the client to the server with a Front End in SilverLight.
My problem is that the file is NOT in the isolation storage (that would be easy!).
The application in few word require to upload images from the user computer similar to the file uploaded FaceBook, (the Java version).
Is there a way to grant permission from the user OR a trick that I might not know to be able to upload files?
Thank you
*I do not want to use the Open File Dialog.
If you don't want to use the open file dialog, then I would say that there are no way, if there were, it would be a bug - a security hole in the sandbox.