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.

Link to comment
https://forums.phpfreaks.com/topic/272081-image-preview-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.