Our great sponsors
-
jQuery-File-Upload
Discontinued File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
class NehnutelnostUploadImagesView(LoginRequiredMixin, ExclusiveMaklerDetailView, DetailView): template_name = "nehnutelnosti/nehnutelnost\_image\_upload.html" model = Nehnutelnost def post(self, request, *args, **kwargs): self.object = self.get_object() form = ImageUploadForm(self.request.POST, self.request.FILES, nehnutelnost=self.object) if form.is_valid(): nehnutelnost_image = form.save() images_count = self.object.images.count() data = {'is\_valid': True, 'row\_html': image_row_renderer(nehnutelnost_image, self.request), 'name': nehnutelnost_image.image.name, 'url': nehnutelnost_image.image.url,} else: images_count = self.object.images.count() data = {'is\_valid': False, 'errors': form.errors, 'images\_count': images_count} return JsonResponse(data) def get\_context\_data(self, **kwargs): context = super(NehnutelnostUploadImagesView, self).get_context_data(**kwargs) context['images'] = self.object.images.all() context['podorys'] = self.object.podorys return context We use https://github.com/blueimp/jQuery-File-Upload plugin to upload images.
Related posts
- Pre-made solution for allowing a client to upload a file to my web hosting (via browser, not FTP client)?
- Can anyone suggest PHP, JavaScript File Manager tool with Crop tool integrated?
- Typescript vs Flow? and why?
- BEST way to upload images to AWS from Next?
- Backblaze webinar Feb 28 @ 10am Pacific: Scaling Media Delivery Workflows with bunny.net and Backblaze B2