Image Uploading with Classic ASP - image

Hey I was wondering if there were any way to upload images in ASP? I am working on my school's server and I don't really know what is installed and what isn't I Googled a little and came up with "Persits.Upload.1" I tried to instantiate the object with this line:
Set Upload = Server.CreateObject("Persits.Upload.1")
It gave me this error,
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
Am I to assume the component is not installed on the server and/or what should I do for uploading images?
Thanks

Sounds like it couldn't load the class, my ASP very rusty though.
That component is a commercial one, so unless someone has paid for it, you probably don't have it installed.
I have used free asp upload http://www.freeaspupload.net/ a few times, although it was a while a go, that might be a reasonably easy option for you.

File upload is a built in part of html and you can process it in asp without any custom compents. Here is some more information:
https://web.archive.org/web/20180312071127/http://www.4guysfromrolla.com:80/webtech/LearnMore/Upload.asp

This is part of the ASPJpeg library, which needs to be purchased (From Persits.com).
I have used this library to upload multiple items in the past.
To upload a single file you can use the <INPUT type=file name=filename>. This is just HTML though, but should work in all browsers

If it's for educational purposes it may be worth droping Persits an email to see if they will give you a free license.
They offer a 30-day free trial on their site.
Good luck

Will Rickards' link is good. You will also need permissions for the IUSR to create files in whatever directory you are uploading too.
IIS (6 I think?) comes with a limit of 200K for uploading files. Only the server admin can change it to allow more.
If you can get your schools server to install COM objects, there are a number of free uploading tools that make things very easy.

I have older classic ASP apps that use the Persits Software AspUpload component. It works great if you need to resize images, get image dimensions, etc., during the upload process.
It is a component you need to purchase and it needs to be installed on the Web server in order for it to work. It is not a core part of ASP.

by the way, you have a typo in your code, is
Server.CreateObject("Persist.Upload.1")
and not
Server.CreateObject("Persits.Upload.1")
I bet that if you correct this, the code will go smooth :D

Related

Need basic step by step instructions to get Flexpaper on to clients website

Greetings o knowledgeable ones,
I may have bitten off more than I can chew and this is the reason why I'm here!
I'm a beginner/intermediate front end coder and I have a client who has asked me to use Flexpaper to view their PDF catalogues on their website.
I know little about PHP and server side stuff (hell, I barely know front end code) and for the life of me I cant find a step by step instruction on how to upload the viewer and the PDFs on to the website/server.
I've read a couple of answers on the website that give me a glimpse into what I need to do but they seem to fall short of a complete answer.
I tried to using the 'Server Publishing' option in my local machine (using MAMP) but got stuck half way through when permissions where denied. Then found an answer eluding to the possibility of publishing to the web using the 'FlexPaper Desktop Publisher Zine' So I downloaded that and published a PDF and now I have a folder that was created on my machine but I'm a little lost from as to what to do next?
Some specific questions I have:
Do I upload the whole folder to the server and if I do what is the
code I have to include on a web page to access this Flexpaper PDF?
Do I need to upload any other applications/helper files to make the
viewer work on the website?
I have multiple PDFs(approx 15) I need to upload - is using the
'Desktop Publisher' to create each PDF the best way to do this? Or
should I use the 'Server Publishing' solution?
Why have I charged my client so little for so much work!?
Flexpaper seems like a great option for viewing PDFs online but it seems to be lacking in a beginning-to-end process of how to implement it onto websites. Unless I am missing something....
I am not a smart man.
Thanks and peace

Is it safe to use code from code.jquery.com for long-term application?

I am using Ajax / jquery on a webpage i am designing... in order for it to function, i include (at the top of my page) the javascript at: http://code.jquery.com/jquery-1.4.4.js
This works great and all, but i have a fear that
1) the code might get changed without me knowing, then i encounter problems and try to debug for days / hours before finding that the code at this site changed
2) the website is no longer used / specific code no longer hosted years from now
So would it be safer to save that javascript file onto my server, and access it from there?
You should use either a Microsoft or Google CDN. It will be much faster, it will be cached for a lot of your users and it's guaranteed to be there, as opposed to the jQuery link you include.
http://code.jquery.com is jQuery's CDN (provided by Media Temple). The code at http://code.jquery.com/jquery-1.4.4.js will never change; jQuery will release a new version (which will be at a different URL), if anything needs to change (which happens all the time; version 1.5b was released today).
The jQuery guys know what they're doing, and they setup a CDN so people can easily link to jQuery. They're just as (un)likely to bring down the CDN as Google and Microsoft are at bringing theirs down.
See http://docs.jquery.com/Downloading_jQuery for more information.
Having said that, it would seem the Google hosted version (http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js), is referenced more in websites; this leads to a small performance advantage as far as your users are concerned, as the file has more chance of being cached.
It's safe, notice the version number? As jQuery is updated then that version number will change.
Of course using a CDN will always mean that it's possible for the content delivery network to go out of business. But that's the case with any non directly controlled server.
You of course could use the Google CDN for jQuery, I highly recommend it.
Relevant:
http://code.google.com/apis/libraries/devguide.html#jquery

Automatic download/upload

We are going to develop a client-server application with web interface which will store office documents on server.
When we use browser as a client we need to perform these three steps to edit a document:
download document to the local machine;
open it in office program and edit;
upload document to the server.
It is very inconvenient. Sometimes it is hard to find where a document was downloaded to, when we need to upload it. Customers will also forget to upload document after editing.
Is there any way or technology to upload document automatically?
Or just any ideas how to make this process more convenient.
Thanks in advance!
I would, suggest, if applicable to store all documents as HTML then allowing editing in a web page powered by CKEditor or a similar tool.
If your documents must be in another format, like Office formats, you might start thinking at Office 365, or use ActiveX controls in your web application, something I believe should be deprecated but works in small (better restricted) enterprise environments.
These are just a couple of ideas.

What Software Do You Use To Create Sitemaps / Site Structure For Large Sites?

Just wondering what software you use to create a visual sitemap / site structure representation before you start big sites?
I am looking to map out a large site, but cannot find any good software to help me map the site visually (And in pages/categories)..
Maybe SketchFlow http://electricbeach.org/?p=145 ? which is included in the Expression Blend Trial http://www.microsoft.com/downloads/details.aspx?FamilyID=92E1DB7A-5D36-449B-8C6B-D25F078F3609&displaylang=en
I strongly suggest taking a look at this tool: http://www.balsamiq.com/products/mockups
The Balsamiq tool is the best for doing mockups (i assume this is what you are referring too when talking about sitemaps before you start...). With this software you can quickly generate a working wireframe of what ever you are creating. So much functionality that you can actually share it with your client to get some good sign offs prior to typing the first bit of code.
Very powerful!
And the other one...just shown at the last MIX09 is SketchFlow. Couldn't remember it to save my life. This is a WAY COOL tool for site maps and UI mock up. I was trying to find you the actual MIX presentation as it is super cool to watch. But here are some YouTube videos of that presentation from a user perspective I guess.
http://www.youtube.com/watch?v=zsAZjb7FKXA
http://www.youtube.com/watch?v=f3ErrS68YMM
Check it out!
update...found the SketchFlow video!!! http://videos.visitmix.com/MIX09/C01F
Great keynote from there too: http://videos.visitmix.com/MIX09/KEY01
I know this is an old question, but for others who find this via search, I personally love mocking my websites up with mind mapping tools. I've tried several but my favorite was MindNode for Mac and Xmind for Windows.
XMind free download:
http://www.xmind.net/
MindNode free download:
https://mindnode.com/
I've also tried MindMeister which works just as well as other mind mapping tools and is hosted for you so you can access your mind maps anywhere. However, MindMeister only allows you three maps (currently) without upgrading to a paid subscription.
Another that I've worked with is mockflow.com which is great for mocking up websites with all their features and buttons and even making clickable navigation. They have a free version, but again it's very limited without upgrading to a paid version.
I'm using Slickplan. This cloud based app allows me to have access to my projects from different machines regardless of their operating systems. All I need is one of the leading web browsers (Chrome, Firefox, Safari).
With Slickplan you can create visual sitemaps from scratch or you can use Site Crawler to import your existing website to visualize and reorganize its structure.
Of course you can always export your projects to the XML format, and use the exported file to create pages and menu systems inside some popular content management system - Slickplan provides plugins for WordPress, Joomla, concrete5 and a few more.

What is the best way to create a web page thumbnail?

Is there some reasonably cross platform way to create a thumbnail image given a URL? I know there are thumbnail web services that will do this, but I want a piece of software or library that will do this locally. I guess in Linux I could always spawn a browser window using a headless X server, but what about Windows or OS X?
You can use Firefox or XULRunner with some fairly simple XUL to create thumbnails as PNG dataURLs (that you could then write to file if needed). Robert O'Callahan has some excellent information on it here:
http://weblogs.mozillazine.org/roc/archives/2005/05/rendering_web_p.html
I know you said you want the service to be local, but... if you have to be connected to the Internet to take the screenshot, you should equally have access to a web service. It seems like a better move to do this than to open yourself up to cross-platform issues of taking screenshots locally.
There are a number of commercial packages that will do what you want. I'm not sure from reading your question if free is a requirement. But here are some applications I've found that are reasonably priced and which do exactly what you want. I have not used them myself, but they have free trial downloads so you can evaluate before you purchase.
HTML to Image from Guanming Software - Runs on Linux and Windows
HTML2Image from SysImage - Runs on Windows
HTML2Image from Tooto - Runs on Windows
Convert HTML to Image from FrameworkTeam - Windows command line tool

Resources