I am working on a ColdFusion application which required to scan a file for virus before it upload to server.
Is it possible?
There's no guarantee that the user even has an anti-virus program in the first place. Even if it was possible for JavaScript to call a desktop program on the user's computer (it can't), you wouldn't know if there was one or which one they had.
Your only choice is to upload the file to your server:
Verify that the file being uploaded is of the correct mime-type and content for what you're expecting.
Make sure that you upload it to a folder that is not publicly available to your website.
Run it through the anti-virus program on your server
There are more tips for securely uploading files on Pete Freitag's site.
Related
I would like to open PDF file inside my Django application, something like
file:///...
I know that a lot of posts state that this should not be done because security reason, and that google block this calls with error. link.
But, I know that:
I saw this behaviour so, I know it can be done somehow
I don't have security risk, because application is internal, not connected to the internet (available over lan)
Protocol file:/// wouldn't exist if there wouldn't be a way to use it.
I also read somewhere that you need to put file in 'public' if you would like to access it via this method. Do anyone know how to do this?
file:// is only available for browsers, not servers.
If you want your Django application to access local files, you need to upload them to the Django application server (at which point they're not really local).
(If the application server is running on the same machine as the client, naturally you can use Python's usual file functions to read the local file system.)
JavaScript can also access local files and process them in-browser as long as they're manually selected by the user.
I was wondering where the location of the files are once they are uploaded to VM instances.
I cannot find it very easily.
I am using the below menu to upload available in ssh web browser window.
UPDATES
I managed to find the upload path of the file uploaded(see my answer below).
But I am now having problems with downloading files. I provide the full path but was unable to download it. Is there any trick to this?
I am using Safari Version 10.0.2 (11602.3.12.0.1)
Finally found the location.
Once the upload is done and you see the success message, the file will be in the users home directory.
The username that you have logged in via ssh web browser to upload the file.
I've created a web application that runs a web service (WCF). The source code is long gone but I just checked that the app itself is still up and running. Given that I have the address to the service (something.azurewebsites.com) and the name of one of the methods exposed (parameterless Ping), how can I learn the location of the WSDL file?
As far I recall, I've exposed it the most common way, the publish file fetched from the suggestion on Azure portal. I'd like to just call the method Ping to verify something, so rebuilding a whole new service seems a bit overkill.
Suggestions on what the exact URL might be? Alternatively, suggestions on a tool to sniff that up?
Go to the Azure portal and find the FTP address for your "something.azurewebsite.net". Then use an FTP program to connect to the server and browse the files. This way you might be able to find the ".svc" file. For that matter, you might be able to download all of your code and use a tool like Reflector to view the .Net compiled code.
I'm developing a Windows intranet application in C++ which needs to download a settings file from a predefined URL hosted on a webserver on the intranet.
This file would be updated every few weeks and I need to get it only if it has changed.
To avoid unnecessary downloads I wanted to know if there is a standard HTTP method to only request the hash of the file to the webserver to prevent a full download if the file has not changed.
I'm still in the design phase and the idea would be to use CURL library on the client to download the file and Apache as a webserver, but I'm also open to other solutions.
I have an application which will create an encrypted file which i want to upload it to Dropbox (from no, and later in google Drive also). How can upload this file to dropbox from within the application. I have googled a lot for MFC integration with dropbox but havent come across any useful resource yet. If anyone has implemented it earlier please help..
For my own app I initially tried this the hard way, writing wrappers around Google Drive and DropBox to interface directly with their web services.
After a while I gave up on that (because the APIs were difficult to work with and there was almost no sample code of any kind) and instructed users to install the respective Windows clients for these services so that uploading was as simple as copying the file to their local Google Drive or DropBox folders.
It may not be the solution you want but it has worked well for me.