Python
xxxxxxxxxx
from django.shortcuts import render
from django.conf import settings
from django.core.files.storage import FileSystemStorage
def upload(request):
folder='my_folder/'
if request.method == 'POST' and request.FILES['myfile']:
myfile = request.FILES['myfile']
fs = FileSystemStorage(location=folder) #defaults to MEDIA_ROOT
filename = fs.save(myfile.name, myfile)
file_url = fs.url(filename)
return render(request, 'upload.html', {
'file_url': file_url
})
else:
return render(request, 'upload.html')
Linux - anc-api-tools qanday o'rnatiladi
Linux - curvedns qanday o'rnatiladi
Python - Raqamning ijobiy, salbiy yoki 0 ekanligini tekshiring
Linux - zenmap qanday o'rnatiladi
C - Butun sondagi raqamlar sonini sanash
C++ - Raqam tub yoki oddiy emasligini tekshiring
C++ - Kabisa yilini tekshiring
JavaScript - Satr ma'lum belgilar bilan boshlanishi va tugashini tekshiring
C - Dinamik xotira ajratish yordamida eng katta raqamni toping
Linux - zstd qanday o'rnatiladi
Linux - xbitmaps qanday o'rnatiladi
Kotlin - Raqamni teskari aylantirish
Kotlin - Raqamni n o‘nlik kasrgacha yaxlitlash
Python - Excel (XLSX) fayllarini yozish
Java - Raqamni teskari aylantirish
C++ - Qism va qoldiqni toping
Kotlin - Sonning faktorialini toping
Java - Piramida va naqsh yarating
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month