Skip to content

Uploading multiple files to PHP server #1

@Qberon

Description

@Qberon

Thank you for a detailed very good explained class and tutorial

For uploading multiple files to server under PHP you need to declare file names as an array like this
name: "uploadedFile[1]" , name: "uploadedFile[2]", name: "uploadedFile[3]"

let textFileURL = Bundle.main.url(forResource: "sampleText", withExtension: "txt")
let textFileInfo = RestManager.FileInfo(withFileURL: textFileURL, filename: "sampleText.txt", name: "uploadedFile[1]", mimetype: "text/plain")

let pdfFileURL = Bundle.main.url(forResource: "samplePDF", withExtension: "pdf")
let pdfFileInfo = RestManager.FileInfo(withFileURL: pdfFileURL, filename: "samplePDF.pdf", name: "uploadedFile[2]", mimetype: "application/pdf")

let imageFileURL = Bundle.main.url(forResource: "sampleImage", withExtension: "jpg")
let imageFileInfo = RestManager.FileInfo(withFileURL: imageFileURL, filename: "sampleImage.jpg", name: "uploadedFile[3]", mimetype: "image/jpg")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions