473,406 Members | 2,867 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,406 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 1642
"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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.