upload zip or rar files

87 views
Skip to first unread message

dk

unread,
Sep 29, 2015, 2:41:27 PM9/29/15
to Django users
I set up a form to upload files,  and every thing works fine,   the only problem is when I am in the webpage and I click the button to choose the file I want to upload doesn't show or zips, or rars.  I try playing with the input tag accept, from all the type of zips,  to leave it open to upload what ever file.

I try it in Firefox, chrome and IE,   I am missing something?

dk

unread,
Sep 30, 2015, 4:54:40 PM9/30/15
to Django users

FYI,
it works if the zip or the rar files were generated in windows,

not if they come from Linux =(...

James Schneider

unread,
Oct 1, 2015, 3:33:18 AM10/1/15
to django...@googlegroups.com

> FYI,
> it works if the zip or the rar files were generated in windows,
>
> not if they come from Linux =(...
>
>

Do you mean that the client is running Windows and can't see zip files that were generated on a Linux machine, or that the client is Linux and you can't see files generated by that client? The latter is more likely, file extensions are almost useless in Linux. Haven't toyed with this, but I could see a Linux client having issues filtering by a file 'type' since that would require reading at least a small portion of each file to determine whether or not or is a zip file.

Do the files you are looking for have the .zip extension? I highly doubt the browser is able to distinguish between files based on where they were generated without some sort of custom plugin magic (since it shouldn't matter).

>
>
> On Tuesday, September 29, 2015 at 1:41:27 PM UTC-5, dk wrote:
>>
>> I set up a form to upload files,  and every thing works fine,   the only problem is when I am in the webpage and I click the button to choose the file I want to upload doesn't show or zips, or rars.  I try playing with the input tag accept, from all the type of zips,  to leave it open to upload what ever file.
>>

Is this a standard HTML input file field? I would recommend removing the accept parameter to see if that clears it up. What values are you providing to accept?

Can you see the files if you tell the file chooser window to show all files?

>> I try it in Firefox, chrome and IE,   I am missing something?
>

There must be something in your HTML code that is triggering this behavior.

Do you have any JS that might be interfering?

-James

Reply all
Reply to author
Forward
0 new messages