I'm trying to use uploadify control in MVC3. It works fine for uploading files.
Here is my problem:
How can i get the files in .zip file ?. Let me clear the question.
Here is a zip file (say : images.zip). It contains 3 jpeg files.
Now if i upload the images.zip file using upload control on my view page i need to get all the image files in the zip file.
If i uplaod images.zip file it should show all the images like this
I dont know how to get the files and how to start.
I've searched google but didnt get any clue about this.
How to get this? If any Jquery or Javascript code is avaliable please post.
If you can use .NET 4.5, there is a new ZipFile class that will let you get properties of a zipped archive.
If you're under 4.5, you will need a 3rd party zip file library, like SharpZipLib or DotNetZip.
Related
I use PrimeNG File Upload in my Angular 6 project and upload files to a master record without any problem. On the other hand, when I edit this master record, I also let users to remove previously added files and add new files by using PrimeNG File Upload.
I think it is good idea to list previously added files (retrieving from Database) of the record as a list item outside of File Upload and display Delete icon right sides of each one. But if there is a possibility to display these previously added files on PrimeNG File Upload, I would like to use File Upload to list them besides adding new ones. So, my questions:
1) Is it possible to use PrimeNG File Upload for such an Edit Scenario and list files (from Database) on it?
2) Is it weird to list previously added files on File Upload element instead of HTML on the popup windows in Edit mode?
Any help would be appreciated.
I am using https://github.com/VeliovGroup/Meteor-Files, This package provide a collection of uploaded files via Meteor-Files.
How can I insert a document about the file that is already uploaded and not via Meteor-Files? I want to use Meteor-Files to save file info only not uploading. Because I need to get a generated download link for the file. This is provided by Meteor-Files.
Anyone can help me guide how to solve this problem?
I used addFile() function provided by FilesCollection class.
I have some files in the local and know the path of those files.
I'm trying to upload the file using AJAX.
How to upload the file using AJAX without using FORM.
enter code here
NOTE: I've the FileReader object of the file.
Please share if u have any idea.
Thanks
You cannot upload a file from the local computer unless triggered by the user (the user should select the file), you can upload a file with jQuery:
https://github.com/blueimp/jQuery-File-Upload
https://github.com/hayageek/jquery-upload-file
I want to download file from external server but after renaming it. Let's say http://playtictactoe.atwebpages.com/logo.png is an image file I want to download. I have used the following HTML:
<a href="http://playtictactoe.atwebpages.com/logo.png" download="myName.png">
Download File
</a>
But this doesn't rename the file. I've read somewhere that this is because of Response Header on server. Is there any way to ignore Response Header on client side? Else guide me any other solution.
You can download the file as a buffer and resave with the file api like descriped here:
HTML5 File API downloading file from server and saving it in sandbox
Or lookup FileAPI and XMLRequest to Buffer. You download the file as binaryBuffer save it with fileAPI and rename it. This should also work in Firefox. But this is not the simple solution you are searching for. Even though it works ;-)
You can then rename the file like you want.
Cheers
I was looking at the upload script here:
http://demo.tutorialzine.com/2013/05/mini-ajax-file-upload-form/
It is using jquery file upload to upload multiple files at once. I would like to know how to pass the order of the files that were selected to the upload.php script. ie. if you have 1.jpg, 2.jpg, 3.jpg, 4.jpg, and 4 finishes uploading first, can upload.php receive a variable that tells it that it is the 4th image that was selected? Does jquery file upload have a way of adding the order to the form action perhaps?
Thanks in advance.
It should automatically upload and read the data in the order it was received once it hits the upload.php layer. So just make sure you upload the files in the order you want them.
Well it was a really easy fix once I found it. There is a variable in the jquery.fileupload.js file called sequentialUploads. Set it to true, and it will force the order of uploads to be the order in which the files are selected.