/    Sign up×
Community /Pin to ProfileBookmark

Multiple File Upload to Web Server

I’ve had a bit play with JavaScript drag and drop and I’ve gotten my head around how to load files within the (client-side) script.. how to identify the names of the files that have been drag/dropped etc.. but how do I take all of these files and ‘post’ them to the my web server?

Can JavaScript alone do this or do I need some other ‘glue’ technology to do this?

My web server is CocoaHTTP, running on my iPhone.

I’m not very familiar with web development – I’m mainly an application developer so this is all rather new to me.

Ideally I would like to launch uploads asynchronously and get some sort of progress (percentage) feedback. I’ve seen this done with the iPhone/Android VLC media player and sites such as MediaFire.com when uploading files.

I would really appreciate it if somebody can point me in the right direction for which technology to use or better still, a suitable tutorial or example. I’ve been Googling for solutions for days but I’m not finding anything helpful – only more questions arise.

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@SparkyNZauthorJan 21.2014 — Possible inspiration:

Drag-n-drop -- http://tutorialzine.com/2011/09/html5-file-upload-jquery-php/

Display -- http://sye.dk/sfpg/[/QUOTE]


Thanks I'll have a look at the drag n drop one. I think I found that yesterday (or similar) and perhaps ignored it when I saw "AJAX". What's AJAX? Is this a server or client-side thing? Just worried about pre-requisits for getting this all to work.
Copy linkTweet thisAlerts:
@SparkyNZauthorJan 22.2014 — http://www.w3schools.com/ajax/default.asp[/QUOTE]

Thanks. That TutorialZine link you provided me looked really promising. Only problem for me is that CocoaHTTPServer doesn't seem to support PHP. Any ideas on how else I could implement the .PHP side of things?
Copy linkTweet thisAlerts:
@Kevin2Jan 22.2014 — Umm... a server besides something running on your iPhone? Although I don't quite understand how you do that, even after looking at the cocoaHTTP info on Github, and looking through the App Store.
Copy linkTweet thisAlerts:
@SparkyNZauthorJan 22.2014 — CocoaHTTPServer is a lump of source that I compile into my own app. That effectively allows my iPhone app to become a web server. I can then use my PC web browser to view pages from my iPhone web server.. run JavaScript etc. It will support uploading of files using POST etc but it won't run .PHP on the server (iPhone app) side. I need to find another way of getting multiple file uploads to work without PHP.
×

Success!

Help @SparkyNZ spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...