HTML - file upload form does not work with iPad - javascript

Uploading files on the IPad is not possible because "Choose file" is grayed out. Is there a workaround to upload files in a iPad browser. I'm using the current chrome for iPad.
my upload code:
document.getElementById("files").addEventListener("change", function ( e ){...});

I don't think there is a workaround to upload files, it is simply not builded in the software... I've never seen a site were it was working. (only in apps)
https://discussions.apple.com/thread/3863546?start=0&tstart=0 is saying the same thing...

You can use the upload file dialog since iOS6, but it only provides access to photos. The best methods of getting a file upload working to your website are:
Create an app that can take file attachments from email and then push them to your website
Setup a special email address users can forward attachments to which then puts those into their account (this method is called piping)
This does however assume that the files needing to be uploaded are sitting in the user's mailbox.

Related

Custom upload file explorer

How can I customize the file explorer window when I try to upload files?
Or maybe something that can get the files from the user side. I'm thinking of doing the same with the Share It app that can display all files from user side.
You can provide specific folder for the file explorer window to open when you try to upload files. You can refer and try one. This has several security concerns and works fine for local. You will have no idea about the specified directory when on server and hence my suggestion would be to leave it up to the user to explore and choose one.
Or maybe something that can get the files from the user side
You can try drag and drop approach to provide a convenient file upload user experience.
Other than these, you cannot perform any other customization like design changes.

Sending a created website to somebody

I am just a beginner in HTML (and soon JS), and I was wondering, once my website is complete (an html file made in either Sublime or Notepad), how do I get that website to other people? If I wanted to make a website eventually with my online portfolio of videos and images, how would I get it out to people?
Uploading website files are one of the very first steps users have to take in order to publish their creation on the Internet. This tutorial will provide a generalized example on how to upload a website using one of three basic tools:
What you’ll need?
Before you begin this guide you’ll need the following:
Access to the control panel of your hosting account
Your website’s files (preferably compressed in a .zip or .tar.gz
format archive)
(Optional) An FTP client and FTP login details of your hosting
account
Option 1 – Upload Your Website via Hosting's File Manager
Navigate to your control panel’s Files category and open File
Manager
After that, go to the public_html directory, which is the root
directory of your domain (for example http://www.domainname.com/).
Your files should be uploaded there. The directory may also be changed depending on what URL you want it to be accessed from. In case
you want the content to show up on
http://www.domainname.com/something/ your content would need to be
located in public_html/something directory.
To start uploading, right-click with your mouse and select Upload
Files option.
To unzip your archive, right-click it and press Extract.
Once the content is located in your desired location, you will be able to access it using any browser.
Option 2 – Uploading Your Website via FTP
Some users prefer using an FTP client, such as FileZilla, SmartFTP, CoreFTP, or any other in order to upload their website. In this example, we will use Filezilla.
Firstly, you will need to get your FTP details.they
are located in your control panel’s FTP Access section. If you are not sure what your FTP password is, you can easily reset it by pressing Change account password section.
Open FileZilla and input your FTP connection details into the fields
at the top of the program, then click Quickconnect.
Once you are connected to the FTP server, use the file browser on
the LEFT side of the program to find your website’s files on your computer. After you have found your website’s files, use the file the browser on the RIGHT side to open your public_html directory on the hosting server. Once you have done this, you can simply drag-and-drop files from left to right and they will be uploaded to the server.(OPTIONAL) Similarly, you can upload a compressed archive via FTP by dragging-and-dropping from left to right. You will also need to extract it via File Manager. Refer to the “Option 1 — Uploading your website via File Manager” part of the tutorial above for instructions on how to extract archives via File Manager.
Option 3 – Uploading Your Website via cPanel’s File Manager
Click on the File Manager icon, located under the Files category.
Once inside the File Manager, open the public_html directory.
Click Upload after entering the public_html directory.
You can click “Select File” to select a singular file, or simply
drag-and-drop your file to the outlined area.
Once the upload is complete, return to the File Manager and you will
see the uploaded archive in your public_html directory. Right, click
the archive and select Extract to extract the archive.
If you receive a prompt asking to specify the location the archive
should be extracted to, make sure to specify /public_html.
The archive is now extracted, all files should now be located inside
public_html. Navigate back to public_html and see if the files were moved successfully.
Your website should now be fully uploaded and accessible via your
website’s URL. All that remains is to access your website and check if everything works correctly. Simply type in your domain name in
your browser, such as http://www.domainname.com/, and check if your
website works to your satisfaction
you have just learned how to upload a website. As you may see, you can upload a lot of files at once via an FTP program more easily, however, each file will be uploaded one-by-one. As a result, it may take a long time for each file to be uploaded separately, so it is still strongly advised to create a compressed archive of your files before uploading them.
On the other hand, the File manager is useful for uploading one or two files quickly, since you do not need a separate program for the File manager to work and can update your website on-the-fly, while working on other tasks inside your hosting control panel.

Script that uploads users file from an exact location

Working on a project where we're using an XML of a user's iTunes tracks and play lists to integrate into other services. On Mac, this file is stored in the default location at /Users/username/Music/iTunes/iTunes Library.xml . Since we need users to be able to upload their own XML file, is there a way to write a script that pulls the file from that location as soon as they click an upload button (saving them from having to search and find it each time)? If so, is this something that can be done through Javascript (or through Rails, since we're using that as well)?
Thanks!
If you mean on a browser, no, you can't. The user has to select the file, you can't pre-select it for them. It's a security measure. If a web page could pre-select the file in an input type="file", it would be trivial to auto-submit that form, or hide the input and trick the user into submitting the form, or read the file via the File API and send it to a server — in all cases, stealing a file from the user's machine without their knowledge or consent.

How to upload the files programmatically in fine uploader?

I was able to use fine uploader successfully and it works like charm. But iam not able to figure out one of my requirement.
My requirement :-
I have information of file(file name, fie url, file size) in javascript object .I want to prepopulate the fineuploader container with the file information (basically when my page loads i want to just prepopulate(display) the files info under fine uploader container. Also i want to display delete icon so that clicking it call goes to my action class). Thats it.
I do not want any upload button just display the file info i have in javascript object under fineuploader
It sounds like you want to construct your own File object given the URL of a resource. You can't do that. Fine Uploader allows your users to upload files from their file system to your server. You can enable the "paste to upload" feature (Chrome only) that allows users to copy an image from another site and paste it into Fine Uploader, where the image will be uploaded to your server. If you want to allow your users to submit a resource given a URL, just send that URL to your server and download it server-side.

Can JavaScript be used to push a file to another machine or web service

I'm relatively new to this
We have a requirement to save a file with out the use of the dialog box.
I was wondering if I can use AJAX or some other JavaScript to "Push" the file from the client PC being viewed in a browser to to some web service the client is running and have it save the file.
Do I get into cross site scripting issues or an issue I don't know about at present?
Thanks
With valums uploader script, users can drag and drop files (in certain browsers) to a button on the page.. so, yes, no dialog box, but it still requires user interaction. (I also know IE10 should be able to handle drag/drop functionality from one of their demos; so this kind of functionality is gaining ground).
I don't think you can upload a file without a dialog box. That would remove the user interaction, so it would be the same thing as allowing a webpage to select any file it wanted and upload it without user interaction - an obvious security flaw.
Generally, without a dialog box, no it can't be done.
HTML5 has a file API where the web app can store files on the local machine. But this access to the filesystem is sandboxed, so you get to access files only under your directory.
Why can't you do without a dialog box? Imagine you visit some site and it "uploads" files without your permission. That's a security FAIL. The dialog box is the user's authentication for the file to be uploaded.

Categories