Skip to content

Instantly share code, notes, and snippets.

View deepakraj27's full-sized avatar

Deepakraj Murugesan deepakraj27

  • Unbox Technologies
  • Bengaluru
View GitHub Profile
@deepakraj27
deepakraj27 / multipart.swift
Created November 2, 2017 11:23 — forked from DejanEnspyra/multipart.swift
Alamofire 4 — Multipart file upload with Swift 3 (http://theappspace.com/multipart-file-upload/)
func requestWith(endUrl: String, imageData: Data?, parameters: [String : Any], onCompletion: ((JSON?) -> Void)? = nil, onError: ((Error?) -> Void)? = nil){
let url = "http://google.com" /* your API url */
let headers: HTTPHeaders = [
/* "Authorization": "your_access_token", in case you need authorization header */
"Content-type": "multipart/form-data"
]
Alamofire.upload(multipartFormData: { (multipartFormData) in
@deepakraj27
deepakraj27 / ViewController.swift
Created November 2, 2017 11:25 — forked from DejanEnspyra/ViewController.swift
Example of organizing UIViewController class with the help of extensions
//
// ViewController.swift
//
// Created by Dejan Atanasov on 01/04/2017.
// Copyright © 2017 Dejan Atanasov. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@deepakraj27
deepakraj27 / DPImageView+LettersExtension.swift
Created June 25, 2018 18:08
An easy, helpful UIImageView category that generates letter initials as a placeholder for user images, with a custom background color and double border with custom stroke width Completely supports SWIFT 4 and SWIFT 3, written excusively for you.
//
// UIImageView+Letters.swift
// UIImageViewLettersDemo
//
// Created by Deepakraj Murugesan on 23/02/18.
// Copyright © 2018 Deepak. All rights reserved.
//
import Foundation
import UIKit
@deepakraj27
deepakraj27 / AttachmentHandler.swift
Last active November 1, 2023 08:40
Access Camera, Photo Library, Video and File from User device using Swift 4
//
// AttachmentHandler.swift
// AttachmentHandler
//
// Created by Deepak on 25/01/18.
// Copyright © 2018 Deepak. All rights reserved.
//
import Foundation
import UIKit