Django : donwloading server files on client side - django

I am running a Django project on a company server also that stores some .pdf and .docx files.
Only workers have acces to this Django app throught their local machines and they need to download files from the server to their machines.
I used webbrowser open, but files were opened on server machine in stead of clients one.
Can you please help me with this issue?
Thanks!

Related

Django - Access and save files to remote server

I am currently developping an application using Django.
What I'm trying to achieve is to have a remote server that will host configuration files. Those files are going to be numerous but quite small.
The configuration of my server is the following : on the adress 172.x.x.51 I have my Django app running with uwsgi and on 172.x.x.52 I have my nginx service connected to my uwsgi instance.
What I would like is to host the files on the nginx server.
Inside the application, I will need to access to the files and to save them (they are calculated from data from the database, so there's no need for a fileupload).
I looked on the documentation and found that I can use a Custom Storage System. The thing is, I don't think that's what I need because I want to store them the way it's done by default. I would just like to define the place where the files should be updated from Django.
Would it be better if I stored them in the media folder on my nginx instance ? How would I say to Django to go look on nginx's instance for the files ? On the server where nginx is hosted, I already host my static files and it's working.
This isn't a question about Django really. Storage backends are for file uploads, but as you say you're not doing that.
You need some way of allowing your Django instance on *.51 write to your nginx server on *.52. This might be via SSH/SCP, or by sharing directories over NFS, for example. Then you can simply save the files over that protocol to the relevant place, from where nginx can serve them.

How to get hash of http content before downloading it?

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.

Separate media server

I have one web server, one db server and one file server. Web and db servers works fine, but I want to place all media files (photos, etc) on file server. Architecture is like that:
I read this and this, but I cant find instructions, how to do this. If someone has already done it, share experiences and code, please :)
Thanks.

How to download epub locally in my app from server (website)

I will show list of epub files from webservice to user which he can download and read in my reader app for ipad. How to download a file into my app from internet or website and save locally with progress bar which he can stop in between or restore. But my priority is atleast epub file can able to download from website to app
I tried this but not download my file.
https://stackoverflow.com/a/8677389/846372
I dont know what i am doing wrong.
Thanks in advance

Web Service application in Delphi 2007

created and deployed a Web service application in a virtual directory using IIS 6.1. The client application works fine on the same machine. But it is not working in another machine where the client application is copied manually. Can any one help what went wrong?
In Internet explorer, The XML file is displayed in the same machine. But from other machine, 'Un able to open the page' error occurs.
Suggestions please...
Regards,
Baskaran A.
Did you check your firewall settings? Can you open other pages that are served by the same IIS webserver?
My first 2 guesses would be:
1) Firewall settings, as previously mentioned.
2) The client app has a hard coded path in it somewhere that ought to be a relative path or, perhaps a URL. Something along the lines of 127.0.0.1 or localhost or C:\... within the app or in its configuration file(s).