Giter Club home page Giter Club logo

restful-file-upload-demo's Introduction

RESTful API Tutorial: How to Upload Files to a Server

Uploading files might not be one of the most common things when dealing with web services. However, it can be proved to be a tedious task to perform when it's time to send files to a server. In the implementation steps that follow we will try to break things down and shed light to the key points and the details of the uploading process. Before we get there though, it's necessary to have a quick discussion about some ground knowledge that we all should have on this topic.

If you're building an iOS app in Swift and need to upload files to servers, this tutorial is written for you.

You can continue to read the full tutorial here.

restful-file-upload-demo's People

Contributors

simonng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

restful-file-upload-demo's Issues

Uploading multiple files to PHP server

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")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.