473,239 Members | 1,491 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,239 software developers and data experts.

Gallery app with Zip file upload

mc
I'm creating a gallery app, I would like users to be able to upload a
zip file (containing images) which I then unpack and and store in a
gallery for online review.

Do I need a third party component or can it be done in c# alone?

TIA

MC
Nov 21 '06 #1
11 1639
"mc" <mc@community.nospamwrote in message
news:45********@mail.hmgcc.gov.uk...
I'm creating a gallery app, I would like users to be able to upload a zip
file (containing images) which I then unpack and and store in a gallery
for online review.

Do I need a third party component or can it be done in c# alone?
http://blogs.msdn.com/dotnetinterop/...05/567402.aspx

Personally, I don't like the System.IO.Compression stuff much, so I tend to
use the Chilkat Zip add-in: http://www.chilkatsoft.com/Zip-DotNet.asp
Nov 21 '06 #2
SharpZipLib http://icsharpcode.net/OpenSource/Sh...b/Default.aspx
could be what you are looking for at the pricely cost of 0$

On Tue, 21 Nov 2006 17:20:33 +0000, mc <mc@community.nospamwrote:
>I'm creating a gallery app, I would like users to be able to upload a
zip file (containing images) which I then unpack and and store in a
gallery for online review.

Do I need a third party component or can it be done in c# alone?

TIA

MC
--

Bits.Bytes.
http://bytes.thinkersroom.com
Nov 21 '06 #3

You cannot do it in C# alone because the System.IO.Compression namespace
doesn't support the multiple file with zipheader zip format (like Winzip) -
only Gzip.

However, you can get the free ICSharpCode.SharpZipLib library which is 100%
C#, and that will handle zip files very nicely.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"mc" wrote:
I'm creating a gallery app, I would like users to be able to upload a
zip file (containing images) which I then unpack and and store in a
gallery for online review.

Do I need a third party component or can it be done in c# alone?

TIA

MC
Nov 21 '06 #4
mc
I probably should have said in my initial post, the "Live" site will be
run from a shared server, so I'd like to avoid third party components if
possible!

Rad [Visual C# MVP] wrote:
SharpZipLib http://icsharpcode.net/OpenSource/Sh...b/Default.aspx
could be what you are looking for at the pricely cost of 0$

On Tue, 21 Nov 2006 17:20:33 +0000, mc <mc@community.nospamwrote:

>>I'm creating a gallery app, I would like users to be able to upload a
zip file (containing images) which I then unpack and and store in a
gallery for online review.

Do I need a third party component or can it be done in c# alone?

TIA

MC

--

Bits.Bytes.
http://bytes.thinkersroom.com
Nov 21 '06 #5
I very much doubt using SharpZipLib will be a problem. It will just be
a DLL you reference in your application and deploy using plain old
ftp.

Besides, you also get the source code so you can include that in your
application if your objective is to get a single DLL.

On Tue, 21 Nov 2006 20:00:15 +0000, mc <mc@community.nospamwrote:
>I probably should have said in my initial post, the "Live" site will be
run from a shared server, so I'd like to avoid third party components if
possible!

Rad [Visual C# MVP] wrote:
>SharpZipLib http://icsharpcode.net/OpenSource/Sh...b/Default.aspx
could be what you are looking for at the pricely cost of 0$

On Tue, 21 Nov 2006 17:20:33 +0000, mc <mc@community.nospamwrote:

>>>I'm creating a gallery app, I would like users to be able to upload a
zip file (containing images) which I then unpack and and store in a
gallery for online review.

Do I need a third party component or can it be done in c# alone?

TIA

MC

--

Bits.Bytes.
http://bytes.thinkersroom.com
--

Bits.Bytes.
http://bytes.thinkersroom.com
Nov 21 '06 #6
Hello MC,

I agree that for your scenario, the ShareZipLib will be more appropriate
since it supports many other zip formats. The compression component in .net
framework 2.0 only support Gzip format currently, and for your scenario
since the user may create the zip attachment through other software that
product zip package other than gzip one, use the built-in one will not
work.

Also, as you mentioned that the application will be hosted on a shared
server, is your concern here that 3rd party component will need to be
install in GAC? If so, by default the sharpziplib component is
strong-named which should be put into GAC, however, since its source code
is available, you can consider compile it as a private assembly and simply
deploy it within private "bin" folder.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 22 '06 #7
mc
Ok, I'll have a look.

Thanks
mc

Rad [Visual C# MVP] wrote:
I very much doubt using SharpZipLib will be a problem. It will just be
a DLL you reference in your application and deploy using plain old
ftp.

Besides, you also get the source code so you can include that in your
application if your objective is to get a single DLL.

On Tue, 21 Nov 2006 20:00:15 +0000, mc <mc@community.nospamwrote:

>>I probably should have said in my initial post, the "Live" site will be
run from a shared server, so I'd like to avoid third party components if
possible!

Rad [Visual C# MVP] wrote:
>>>SharpZipLib http://icsharpcode.net/OpenSource/Sh...b/Default.aspx
could be what you are looking for at the pricely cost of 0$

On Tue, 21 Nov 2006 17:20:33 +0000, mc <mc@community.nospamwrote:

I'm creating a gallery app, I would like users to be able to upload a
zip file (containing images) which I then unpack and and store in a
gallery for online review.

Do I need a third party component or can it be done in c# alone?

TIA

MC

--

Bits.Bytes.
http://bytes.thinkersroom.com

--

Bits.Bytes.
http://bytes.thinkersroom.com
Nov 22 '06 #8
mc
Refreshingly simple to use, very useful library!

I did however have to recompile and add the Allow partially trusted
callers (APTCA) attribute to get it working on my host, who has just
tightened there security restrictions. which they say is in response to
a security hole identified by MS?

Thanks All
MC

mc wrote:
Ok, I'll have a look.

Thanks
mc

Rad [Visual C# MVP] wrote:
>I very much doubt using SharpZipLib will be a problem. It will just be
a DLL you reference in your application and deploy using plain old
ftp.

Besides, you also get the source code so you can include that in your
application if your objective is to get a single DLL.

On Tue, 21 Nov 2006 20:00:15 +0000, mc <mc@community.nospamwrote:

>>I probably should have said in my initial post, the "Live" site will
be run from a shared server, so I'd like to avoid third party
components if possible!

Rad [Visual C# MVP] wrote:

SharpZipLib http://icsharpcode.net/OpenSource/Sh...b/Default.aspx
could be what you are looking for at the pricely cost of 0$

On Tue, 21 Nov 2006 17:20:33 +0000, mc <mc@community.nospamwrote:

I'm creating a gallery app, I would like users to be able to upload
a zip file (containing images) which I then unpack and and store in
a gallery for online review.
>
Do I need a third party component or can it be done in c# alone?
>
TIA
>
MC
--

Bits.Bytes.
http://bytes.thinkersroom.com


--

Bits.Bytes.
http://bytes.thinkersroom.com
Nov 27 '06 #9
Hello MC,

What is security hole you mentioned? For the APTCA attribute, if your
ASP.NET application is configured to partial trust level, making your
assembly APTCA is necessary. Also, some assembly may demand some CAS
permissions that are not grant in partial trust level policy(such as medium
or low trust level), you need to take care of this if you meet such cases.

Here are some msdn articles about using partial trust CAS in ASP.NET 2.0:

http://msdn.microsoft.com/library/de...us/dnpag2/html
/paght000020.asp

http://msdn.microsoft.com/library/en...7.asp?frame=tr
ue
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 28 '06 #10
mc
Not being a security expert or Microsoft person I can only go on the
information released by Brinkster (My Shared Web host) They tell me that
They where informed by Microsoft of a security hole in IIS which when
the trust level was too high a tech savvy user could gain access to
other users sites, The MS solution was to apply a patch and then set the
trust levels appropriately. this, I've been told by my host is that any
external Assemblys require th APTCA and That we no-longer have access to
things like the registry or event logs (Which I've no use for).

To get my .NET 2.0 site to work all I need to do is re-publish it with
string named Assemblys and specified the APTCA attribute. after doing
this all was fine.

Once I'd recompiled the SharpZipLib assembly with APTCA it also worked fine.

MC

Steven Cheng[MSFT] wrote:
Hello MC,

What is security hole you mentioned? For the APTCA attribute, if your
ASP.NET application is configured to partial trust level, making your
assembly APTCA is necessary. Also, some assembly may demand some CAS
permissions that are not grant in partial trust level policy(such as medium
or low trust level), you need to take care of this if you meet such cases.

Here are some msdn articles about using partial trust CAS in ASP.NET 2.0:

http://msdn.microsoft.com/library/de...us/dnpag2/html
/paght000020.asp

http://msdn.microsoft.com/library/en...7.asp?frame=tr
ue
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 28 '06 #11
Thanks for your reply MC,

Yes, when configured as partial trust, external assemblies are required to
mark as APTCA. Also, if the appliation do need any particular CAS
permissions, we need to configure them in the security policy.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 29 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: matt | last post by:
I have compiled some code, some written by me, some compiled from various sources online, and basically i've got a very simple flat file photo gallery. An upload form, to upload the photos and give...
2
by: Martin Brunner | last post by:
Hello! I tested several picture galleries now but I didn't find anyone I like. It should be very simple (just login and upload) but it should be able to rezise pictures. You specify a value...
5
by: bob garbados | last post by:
I am trying to create a database-driven photo gallery for a friend with an admin form to upload images... I can upload a file to the web server, but I want to store the image in a database and I...
3
by: bob garbados | last post by:
I'm looking for thoughts on photo galleries and security/performance implications... I'm working on an asp.net site in vb that will include an updateable photo gallery that will display thumbnails...
1
by: Throw | last post by:
G'day everyone I'm looking for a simple photo gallery script in PHP (or Perl), but not too simple. I have tried several photo gallery scripts in either language and I have found that they are...
11
by: Richard | last post by:
All I want to do is to read a list of the image files in my folder and display them on a page. That way I don't have to re-write the page, I can just upload extra images. I don't need fancy...
1
by: 4wheelinwilly | last post by:
I am somewhat new to PHP, but really like it so far. I have created a database (MySQL) and upload/edit pages enabling the user to upload photos and descriptions. Outputing them in a gallery format...
2
anfetienne
by: anfetienne | last post by:
hi, i've got a flash gallery which i've paid for. Im using swf object to import vars to the gallery....the var being imported is a html address to specify the location of files and folders. The...
4
by: saunders1989 | last post by:
Hi, my goal is to create a website with an image gallery. i have about 6 buttons at the bottom of the page whcih when clicked will take you to a different album of photos. i have created the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.