Comments (4)
Does your server work with other kinds of uploads, with curl, for example? Does it receive the request despite the file missing?
Daniel Duan
Sent from my iPhone
On Sep 21, 2016, at 8:08 AM, aguel [email protected] wrote:
Im currently on XCode 8 with Swift 3 and i have a PHP file upload handler in the server side. Using the provided playground file, and basically just changing the POST URL to my PHP handler, upload doesnt work (file not reaching the server) but no error whatsoever.
From playground:
let elonPhotoURL = Bundle.main.url(forResource: "elon", withExtension: "jpg")!
let uploadResult = Just.post("http://xxxx.com/uploader.php", files:["elon": .url(elonPhotoURL, "image/jpeg")]) // <== that's it
print(uploadResult.text ?? "")—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from just.
Yes. As explained above, it works on other HTTP Client libraries. Basically the code uses POST, so i was thinking if this is a file upload, isnt this supposed to be PUT?
from just.
@aguel from a technical point of view, there's no different between POST and PUT. But modern conventions give them different semantic meanings. Can you post uploadResult.text
here?
from just.
Not an issue at all. I missed one parameter in the data section causing the problem.
from just.
Related Issues (20)
- Authentication is not happening in swift 4 HOT 1
- Playground Execution Failed
- POST is returning nil response in Swift 4
- How to use Just in multipart?
- Just is giving code -1001 HOT 1
- Multiple Image
- Can Just Support proxying HTTP requests? HOT 1
- Just.get params always return string Optional HOT 1
- Just.framework missing CFBundleVersion when uploading HOT 7
- Not available like pod
- Multiple endpoints
- How can I send a single string parameter?
- Not building in Xcode to run on device
- Does Just follow redirect links?
- Just.get() crash when `makeTask` HOT 2
- It seems like `asyncCompletionHandler` is executed before download task is done HOT 1
- [Suggestion] Completion handler should be call on Main Thread
- Utilizing r.json response? HOT 2
- Just Library is not supported for Xcode 12 and above HOT 1
- How to Download file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from just.