Hi again,
-- Different frameworks will probably not affect your upload speed. The web server (regardless of framework) is not the main problem, but the network speed, so regardless of which framework you choose in the end, it won't be the bottleneck. The thing is your web server is probably not even in the same country as you and the network connection will be the bottleneck for all frameworks. Not even if you are on the same network, the framework speed would be an issue.
But even so - you should probably think a bit more about design if you want to upload 1GB files - the web server itself will first of all be busy taking care of the files, and then you will need a very large harddrive to store the files?
I think you should probably look into more useful use cases and see if the framework is good for you in that regard.
Regards,
Andréas
2017-09-26 22:16 GMT+02:00 Allan <allaneivazian1@gmail.com>:
Andreas my supervisor has asked me to determine the feasibility of using different frameworks for our web application. Django seems nice to work with mainly because it is in Python and that gives us a lot. Will different frameworks result in a huge difference in aspects such as data upload? We are new to web development and at this stage we are doing research, and this would be a nice example to show.--
On Tuesday, 26 September 2017 00:37:58 UTC-7, Andréas Kühne wrote:Hi!Yes that is realistic in the sense that it takes a couple of seconds to upload a 1GB file to localhost. It should take a small amount of time, because it is just copying the file (through django) to the directory you specified.However uploading a 1 GB file to a web server on the Internet isn't feasible. It would probably take to long to upload and the connection would time out - unless you do a bit of magic on the connections.So, my question to you is what are you trying to accomplish? What is the purpose of your test?Regards,Andréas2017-09-25 22:42 GMT+02:00 Allan <allanei...@gmail.com>:I've created a simple form for data upload. I'm testing it through localhost and was wondering if this is realistic. Web development is a new area for me so bare with me please if this is a laughable question. I uploaded a 1GB file and it was uploaded and moved to a folder in my project in a matter of a few seconds.
def simple_upload(request):
if request.method =='POST' and request.FILES['myfile']:
myfile = request.FILES['myfile']
fs = FileSystemStorage()
filename = fs.save(myfile.name, myfile)
uploaded_file_url = fs.url(filename)
return render(request, 'simple_upload.html', {
'uploaded_file_url': uploaded_file_url
})
return render(request, 'simple_upload.html')
{% load static %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
<input type="file" name="myfile">
<button type="submit">Upload</button>
</form>
{% if uploaded_file_url %}
<p>File uploaded at: <a href="{{ uploaded_file_url }}">{{ uploaded_file_url }}</a></p>
{% endif %}
<p><a href="{% url 'dashboard' %}">Return to home</a></p>
{% endblock %}
Thanks!To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.--
You received this message because you are subscribed to the Google Groups "Django users" group.com .
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bf2476d2-8470 .-4c91-8590-99ecc4f477de%40goog legroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b3d9b14e- .7adc-407a-8771-131e01877fec% 40googlegroups.com
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK4qSCcQn5HscOsuk%2BG2DHge5oR3QE9RUGfqEmdGcPbZ7T10gA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment