How to upload the files programmatically in fine uploader? - javascript

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.

Related

Save PDF to server instead of on client machine

I have a URL http://test.com/test.pdf this link opens the PDF in browser fine. Now I have a form inside this PDF like first name, last name etc.
The user fills in this form and I want to upload it to server. The Save button inside PDF would save the file locally. Instead I need a separate Save button that can convert the PDF and it's data to byte array and submit to my server.
Is this possible?
Unless you limit which PDF viewers can be used, you won't be able to do this. Most modern browsers will display the PDF with their built-in viewer but most of them can't deal with forms and when they do, they get it wrong. However, if you can force the PDF to download and open in Adobe Reader, you can add a button to the PDF that will submit the entire filled form to your server as the body of an HTTP post (not a file in a multi-part form submission). When creating the submit button, use a fully qualified URL to your script that saves the file to your server. It's super easy.

What is the minimum requirement to upload an image in CKeditor?

I use jQuery adapter in my program. I tried a number of configurations, but the upload button does not appear on the image dialog.
Which files should be included in the page and how it should be configured?
Please provide a minimum working example of an Ckeditor that can simply upload an image to server.
Minimum Requirements:
You should use uploadimage
addon in CKeditor for uploading image in
CKeditor
Once properly set up through the config.filebrowserBrowseUrl and config.filebrowserUploadUrl configuration settings, all file manager features will automatically become available. This includes the Upload tab in the Link or Image Properties dialog windows as well as the Browse Server button.
Some steps:
Make sure your CKEditor instance includes an “Insert Image” button
Enable the file upload dialogue box
Telling CKEditor where your image upload script lives
Writing the script to handle the image upload in Backend
Grant Correct File Permissions to your Backend Script
More resources:
http://www.mixedwaves.com/2010/02/integrating-fckeditor-filemanager-in-ckeditor/
https://stackoverflow.com/a/1498674/1045444

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.

Safari method of getting full path to a desktop file that is dragged to a browser window [duplicate]

I am trying to allow users to upload pictures to the server.
I am trying to create a similar system to any website that has an 'attach' file or 'upload image' feature. All I need is to get the full path of the file select by the file dialog.
I tried using this for the file dialog with no success:
<input type="file">
This method does not provide the full file path, due to security reasons. My question is how can I create a similar input dialog to websites like tinypic, photobucket, etc.. that can help users input the full file path of a given image, into an input field?
I am aware that this cannot be done using the method above for security reasons, however, I have seen this done before on various websites without any problems, I was wondering what I had to do to implement a similar file dialog that helps fill in the text, which is a full file path, of an input field?
It is not possible to get the file full path on local machine using browser and javascript.
However, as you would like to upload the file to the server, the easy possibility I see is to use html form with input type file. You will receive the file on your http server when the form is submitted.
Here is a very good url http://www.cs.tut.fi/~jkorpela/forms/file.html that explains the whole process nicely.

HTML - file upload form does not work with iPad

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.

Categories