Jump to content

Image Preview Question


programming.name

Recommended Posts

Hi,

 

I'm trying to make some kind of image preview. I am currently using native html5 tag output and fileReader object in javascript. It works great with me but my target browser doen't support it. So I decided to go with

 

xmlhttprequest to get this job done. It also works perfectly.

 

My ajax image preview basically does the following:

 

if an user select an image file from local disk, the onselect event fires the javascript function preview().

 

What it does is first, the file is uploaded to the desired folder, and the image will be displayed with the img tag.

 

And if another file is chosen then the file currently uploaded is removed(in terms of server space) and new chosen image is uploaded to the server.

 

So far so good. But if a tricky user keeps previwing image like 50 times or so, is that still fine? I'm just concerned about server overhead. Is this considered to be "heavy"? File size limit is 3MiB.

 

If is this acceptable approach for normal, good, "tame" users? I need your advice.

 

Thanks.

Edited by programming.name
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.