I'm developing an intranet site for my company, and part of the task it has to perform is to hold a database of files and their locations as submitted by users (the files are on a network drive and people viewing the database can click links to the files to access them). I have it working now using a standard text input field where the user enters the path to the file, but is there a way of giving the user a Browse... button to choose the path instead?
Using the type="file" option isn't suitable as I don't want the actual file submitted, and it only gives the filename, not the path for security reasons. But that's the sort of thing I'd like.
Thanks!
No.
Browsers aren't designed to expose details of the client file system to the server.
Build your file browser server side instead. The server should be able to access the same network drive.
Related
We have an SSRS 2012 report we have used URL access in order to automatically save to CSV upon running. This works fine, However, now I am told they want to force the report to save to a specific folder location for security reasons (they don't want it being saved to desktop) instead of allowing the user to save wherever. Is there a way to at the very least force a default location using URL access? Assuming this cannot be accomplished purely through the URL any suggestions for an alternative method?
You can find all of the applicable URL parameter commands here in the MS documentation.
That being said, there is no reference to the save location for the export render command that you are using to generate the CSV files. This makes sense because when a website serves a file to download to a browser, the location that the file is saved is actually a browser setting (IE instructions to change location)
I see two possible options:
Utilize a GPO to target the specific users and modify their registries to set the default download location (note that this affects everything they download). An example of this tutorial can be found here.
Use a Windows File Share subscription. If you view the report properties and click 'Subscribe', you can setup a file share delivery on a scheduled interval and export as a csv. Note that this is a schedule delivery though and obviously won't work if you users need to ad-hoc run the report on their timing.
My requirement is to show a panel where I list the local system directory, from where I drag and drop the files inorder to perform operations on it.
In HTML5 the FileSystem API is available , but most of the browsers are not supporting.
Is it possible by using input type as file? Like we browse and select a directory, then we can see the list of files and their details?
As the previous commenters correctly noted, this is not possible because it is considered a security hole. Think about a malicious script that could read out everything on your local file system just by visiting a web page.
You can however implement file drag-and-drop like this: https://github.com/moxiecode/plupload
I have a Air/Flex desktop application and I'm trying to create a component within the app that can view files on the web server is is already connected to. It just needs to access one particular folder that will contain PDFs, Images & Word documents. I also want the ability to click on the files and having them open in their default desktop applications.
Is this possible and how would I go about doing this?
It's possible but not with your Flex/AIR app alone. It cannot view files/directories on server by itself but it can communicate with your server via webservices, AMF, or any other back end based service. Typically the back end reads the folder and send this information to your app. Your app can open those files in corresponding app but only if those files are available on disk so your app will have to download them prior to opening them.
Every Application has different needs but I myself usually save anything to a desktop or you can use the App storage container as well. As I use only the desktop I download what is needed OR been asked for, and the visitor has the choice of keeping it or if not needed it gets automatically deleted! this way you can use whatever PDFs, Word, Images etc. use read and write (re-write) as well as creating PDFs on the fly with Images, text etc, and that way a visitor also can print directly at his or her own leisure. regards aktell
I'm writing an iPhone app, MyApp, which needs access to documents on and off-line. My users are already managing these documents (pdf's, movies, etc) via the Box iPhone app synching with the company server.
If MyApp knows the path & filename of a document, is it possible to use the Box URL Schemes to launch Box and open the document externally?
MyApp doesn't need to store or access the files and since Box already has the files downloaded, there's no point storing them in the Document space of both apps.
If there is such a URL Scheme, two follow up questions are: A) is there a callback to return to MyApp when the document is closed, and B) can MyApp use another URL Scheme to get a list of documents?
NSURL *ourURL = [NSURL URLWithString:#"box://some/path/to/fileid?callback=myapp://"];
if ([ourApplication canOpenURL:ourURL]) {
[ourApplication openURL:ourURL];
}
If this isn't currently possible, but of interest to Box, I'm interested in being a beta tester/early adopter.
If you just want to direct the user to a Box page, you may be able to direct the user to a specific file in one of two ways:
1) If the file is shared in Box and you have the shared name, you can generate a shared url (see sharing in the docs at developers.box.com). This only works for files that were shared, however.
2) If you have the file id of the file in Box, you can generate a URL to which the user can login to one's Box account and view the content. You can determine that URL by going into Box and seeing how URLs are displayed when you click on a particular file. We don't like to advertise that URL for developers, however, because we don't guarantee that this URL format will be maintained in the future. It hasn't changed in a while, so it's probably safe to use, but Box provides that "use it at your own risk" disclaimer.
Unfortunately, Box doesn't have a way to pull up a file based on file path. You need the file id or shared name. There isn't a url that relies on file or folder names.
I am writing a small web site for a company Intranet and have the following question that may be simple. Is it possible to open an Excel file from it's current location on the network instead of downloading it. So that any changes made are made to the actual file and not a downloaded version of it?
Thanks
Matt
Yes, it's possible, but then you would have to specify the address of the file in the local network, not as an HTTP address on the web server.
The user would naturally need to have access to the file on the network share, with write permission.
No. It is not possible to open a remote excel file across HTTP and write changes back to it.
Let's consider some other things you might be trying to do.
If you are running excel, all you can open are files visible to the file system APIs. That means files on your local disk and network file systems accessible via CIFS. Mapped drive letters, \\ pathnames, that sort of thing.
If you set up an Excel file for download from a web server, it will always be downloaded. Excel won't open it 'in place'.
The Microsoft technology solution that addresses what you seem to be asking for is Sharepoint.
Anything you open from a HTTP connection I believe is "downloaded" to the client. Its more how you "uploade" the changes.
But if thats what the customer wants I have some alternatives:
1) Use Dropbox or similar filesharing utils. Once someone saves a document in Dropbox, its automatically uploaded to the Dropbox account. The free version allows up to 2 GB of data. Thats quite a few Excel files.
2) Use Gmail/Google Apps. If you do you get 1 GB space for online documents. You can upload Office files suchs as Excel and they will be converted an online editable from within the Google Docs. You can share the files within the domain or even externally if you make that setting the admin part. Afterwards you can also download/export the Spreadsheet as Excel format. I havent tested how much of the standards you loose but ofcause its not a full Excel.
3) wait for Microsoft to finish their Office online. I bet that Excel version will do exactly what you are currently asking for by using some special plugin or MSIE9 technics. But I dont really know yet.
Hope some of this gave you some ideas?
If the file is in a network share on the same domain (or reachable from the domain your app is running from), it is possible, provided that
The share is readable and writeable by the domain\user the app runs under (via ownership or assigned role.)
The file is shareable (IIRC). This is important if multiple users (or apps) need to access it.
Other than that, a \domain\location path should be treatable just like a local (or disk mounted) path.
In your HTML document, create/place a link:
<a href='file:///H:/docs/foo/bar.xls'>Your Excel File</a>
Substitite your network UNC path for H:/docs/foo/bar.xls. Note the slashes instead of the regular UNC backslashes.