|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
file upload.typeIs there a way to detect that the file upload.type matches one of the
supported file extensions in Lasso SiteAdmin, without having Lasso prompt for authentication? I can't seem to find a way to get an array or map of the site's supported file extensions. Anyone know if this is possible? Many thanks, Adam -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: file upload.typeBe careful about relying on upload.type:
http://www.nabble.com/File_uploads-%3Efind%28%27type%27%29-not-as-accurate-as-expected..-How-to-really-know-what%27s-being-uploaded!-td25931629.html#a25934234 Robert Carpenter offered this solution to the problem: http://www.nabble.com/Re%3A-File_uploads-%3Efind%28%27type%27%29-not-as-accurate-as-expected..-How-to-really-know-what%27s-being-uploaded%21-p25932966.html And Bil offered security considerations in that same thread. I don't know whether that answers your question. --steve On 10/26/09 at 10:44 AM, lists@... (Adam de Zoete) pronounced: >Is there a way to detect that the file upload.type matches one >of the supported file extensions in Lasso SiteAdmin, without >having Lasso prompt for authentication? > >I can't seem to find a way to get an array or map of the site's >supported file extensions. > >Anyone know if this is possible? > >Many thanks, > >Adam > > >-- >This list is a free service of LassoSoft: http://www.LassoSoft.com/ >Search the list archives: http://www.ListSearch.com/Lasso/Browse/ >Manage your subscription: http://www.ListSearch.com/Lasso/ > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Steve Piercy Web Site Builder Soquel, CA <web@...> <http://www.StevePiercy.com/> -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: file upload.typeThanks Steve, that thread didn't turn up when i searched Nabble. Some
good solutions there. Adam Steve Piercy - Web Site Builder wrote: > Be careful about relying on upload.type: > http://www.nabble.com/File_uploads-%3Efind%28%27type%27%29-not-as-accurate-as-expected..-How-to-really-know-what%27s-being-uploaded!-td25931629.html#a25934234 > > > Robert Carpenter offered this solution to the problem: > http://www.nabble.com/Re%3A-File_uploads-%3Efind%28%27type%27%29-not-as-accurate-as-expected..-How-to-really-know-what%27s-being-uploaded%21-p25932966.html > > > And Bil offered security considerations in that same thread. > > I don't know whether that answers your question. > > --steve -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: file upload.typeOn 10/26/09 at 7:30 AM, lists@... (Adam de Zoete) wrote:
>>Robert Carpenter offered this solution to the problem: >>http://www.nabble.com/Re%3A-File_uploads-%3Efind%28%27type%27%29-not-as-accurate-as-expected..-How- >to-really-know-what%27s-being-uploaded%21-p25932966.html This solution talks about using the "file" utility to figure out what type of file is passed to it. I did a few trials using this utility on Mac OS X 10.5.8 client. Here are the results: file somegraphic.png somegraphic.png: PNG image data, 974 x 801, 8-bit/color RGB, non-interlaced file nerdvenndiagram.gif nerdvenndiagram.gif: GIF image data, version 89a, 434 x 407 file busplan.doc busplan.doc: Microsoft Office Document file sometext.txt sometext.txt: ASCII text, with no line terminators file detail.lasso detail.lasso: ASCII C++ program text file content_params.inc content_params.inc: ASCII C++ program text file favicon.ico favicon.ico: MS Windows icon resource - 1 icon file SampleFlashVideo.flv SampleFlashVideo.flv: Macromedia Flash Video file cms.css cms.css: ASCII c program text file jquery-1.2.3.js jquery-1.2.3.js: file basic_encrypt.cc basic_encrypt.cc: ASCII C++ program text file setup.py setup.py: ASCII Java program text file google2efb82d6ddcde960.html google2efb82d6ddcde960.html: HTML document text file fckpackager.xml fckpackager.xml: XML 1.0 document text file view.phtml view.phtml: PHP script text file EasyTestimonial_v1.zip EasyTestimonial_v1.zip: Zip archive data, at least v1.0 to extract file freshinstall.sql freshinstall.sql: UTF-8 Unicode c program text, with very long lines So it looks like for some filetypes it is correct, others it is completely off the mark, and some returns nothing at all. I vote this "busted". --Eric -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: file upload.typeOn Oct 31, 2009, at 8:03 AM, Eric Landmann wrote:
> So it looks like for some filetypes it is correct, others it is > completely off the mark, and some returns nothing at all. I vote > this "busted". I don't know if I'd call it "busted," but it is worthwhile to note its limitations. I don't find these results particularly surprising, particularly for the text-based files (.lasso/.inc/.py, etc.) - I think there's more than a little irony in the decision to name the definitions files this tool uses "magic" ;-) You can view the files it uses on OS X here: /usr/share/file/magic /usr/share/file/magic.mime Seems like identifying text file stuff is particularly...squishy. For example, while I was looking at the files, I noted that one of the identifiers it uses for python files is the presence of """ (triple quotes), which python uses to allow retaining line endings in strings - that may be idiomatic of python scripts, but definitely not proof that you're dealing with a python file. I'd think it would tend to be more accurate and useful with binary file types like images and videos, where there are established specs that require specific characters in specific locations in a file. Ultimately, I think of this as one item in a larger toolkit, and like all tools you need to consider the requirements and risks of the job you're tacking. Is it perfect? No. Is it useful and a step up from relying on file extensions or mime types returned from the web? I think so. My $.02. -Robert- -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: file upload.typeAlso, before I forget, while I was poking around for info on "file," I
came across a similar tool for Windows: http://mark0.net/soft-trid-e.html I have *absolutely no idea* whether or how well it works, but I think someone asked after a Windows option for the file utility, so I thought I'd share. HTH! -Robert- On Nov 2, 2009, at 11:47 AM, Robert Carpenter wrote: > On Oct 31, 2009, at 8:03 AM, Eric Landmann wrote: >> So it looks like for some filetypes it is correct, others it is >> completely off the mark, and some returns nothing at all. I vote >> this "busted". > > I don't know if I'd call it "busted," but it is worthwhile to note > its limitations. > > I don't find these results particularly surprising, particularly for > the text-based files (.lasso/.inc/.py, etc.) - I think there's more > than a little irony in the decision to name the definitions files > this tool uses "magic" ;-) > > You can view the files it uses on OS X here: > > /usr/share/file/magic > /usr/share/file/magic.mime > > Seems like identifying text file stuff is particularly...squishy. > For example, while I was looking at the files, I noted that one of > the identifiers it uses for python files is the presence of > """ (triple quotes), which python uses to allow retaining line > endings in strings - that may be idiomatic of python scripts, but > definitely not proof that you're dealing with a python file. > > I'd think it would tend to be more accurate and useful with binary > file types like images and videos, where there are established specs > that require specific characters in specific locations in a file. > > Ultimately, I think of this as one item in a larger toolkit, and > like all tools you need to consider the requirements and risks of > the job you're tacking. Is it perfect? No. Is it useful and a step > up from relying on file extensions or mime types returned from the > web? I think so. > > My $.02. > > -Robert- > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/Lasso/Browse/ > Manage your subscription: http://www.ListSearch.com/Lasso/ > > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: file upload.typeBased on the description, this would be the better choice for all
platforms... -- Jason Huck Director of Technology Core Five Creative 2245 Gilbert Ave. 300 Cincinnati, OH 45206 v: 513.723.0101x16 | f: 513.362.2643 c|5 :: aligning brand & business On Nov 2, 2009, at 4:58 PM, Robert Carpenter <lasso@...> wrote: > Also, before I forget, while I was poking around for info on "file," > I came across a similar tool for Windows: > > http://mark0.net/soft-trid-e.html > > I have *absolutely no idea* whether or how well it works, but I > think someone asked after a Windows option for the file utility, so > I thought I'd share. > > HTH! > -Robert- > > On Nov 2, 2009, at 11:47 AM, Robert Carpenter wrote: > >> On Oct 31, 2009, at 8:03 AM, Eric Landmann wrote: >>> So it looks like for some filetypes it is correct, others it is >>> completely off the mark, and some returns nothing at all. I vote >>> this "busted". >> >> I don't know if I'd call it "busted," but it is worthwhile to note >> its limitations. >> >> I don't find these results particularly surprising, particularly >> for the text-based files (.lasso/.inc/.py, etc.) - I think there's >> more than a little irony in the decision to name the definitions >> files this tool uses "magic" ;-) >> >> You can view the files it uses on OS X here: >> >> /usr/share/file/magic >> /usr/share/file/magic.mime >> >> Seems like identifying text file stuff is particularly...squishy. >> For example, while I was looking at the files, I noted that one of >> the identifiers it uses for python files is the presence of >> """ (triple quotes), which python uses to allow retaining line >> endings in strings - that may be idiomatic of python scripts, but >> definitely not proof that you're dealing with a python file. >> >> I'd think it would tend to be more accurate and useful with binary >> file types like images and videos, where there are established >> specs that require specific characters in specific locations in a >> file. >> >> Ultimately, I think of this as one item in a larger toolkit, and >> like all tools you need to consider the requirements and risks of >> the job you're tacking. Is it perfect? No. Is it useful and a step >> up from relying on file extensions or mime types returned from the >> web? I think so. >> >> My $.02. >> >> -Robert- >> >> -- >> This list is a free service of LassoSoft: http://www.LassoSoft.com/ >> Search the list archives: http://www.ListSearch.com/Lasso/Browse/ >> Manage your subscription: http://www.ListSearch.com/Lasso/ >> >> > > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/Lasso/Browse/ > Manage your subscription: http://www.ListSearch.com/Lasso/ > > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
| Free embeddable forum powered by Nabble | Forum Help |