Backend Php will be better to use
To post a video you need simple UI having browse or capture video features
func createRequest (videoname : String!) -> NSURLRequest {
print("Path of video upload is:\(videoname)")
let param = [
"key" : "\(self.key)",
"secret" : "\( self.secret)",
"package_name" : p_name,
"video" :"\(videoname)"
]
let boundary = generateBoundaryString()
let url = NSURL(string: Constants.URL_AppFileUpload)!
let request = NSMutableURLRequest(URL: url)
request.HTTPMethod = "POST"
request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
//request.HTTPBody = createBodyWithParameters(param, filePathKey:"video",paths:[videoname], boundary: boundary)
request.HTTPBody = createBodyWithBoundary(boundary, parameters: param, paths: [videoname], fieldName: "video")
request.timeoutInterval = 120.0
return request
}
You can post video using multipart form data format as given in above example
you can use this packages to use video features in iOS:
import Foundation
import AVKit
import AssetsLibrary
import AVFoundation
solved I need advice on creating an app for uploading training videos [closed]