Advertisement:

Author Topic: New upload method  (Read 4334 times)

texthiller

  • Full Member
  • ***
  • Posts: 207
New upload method
« on: July 13, 2012, 12:19:10 pm »
I think that the actual method of upload of images is bad because the users spend more of time to load the new ads
. The new method is starting upload the photo after the selection in background. In this way each selection starts loading and the user can concentrate on the completion of ads.

Bye! ;)

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: New upload method
« Reply #1 on: July 17, 2012, 12:22:32 pm »
Hi texthiller,

I really like your idea, technically it's a bit difficult to implement, but we want to include it as soon as possible.


Thanks

morvy

  • Full Member
  • ***
  • Posts: 103
  • always dissatisfied
Re: New upload method
« Reply #2 on: July 18, 2012, 05:18:03 pm »
how about this? it's free, theme can be changed and it's working well

http://kcfinder.sunhater.com/

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: New upload method
« Reply #3 on: July 18, 2012, 05:41:43 pm »
Hi morvy,

The problem here is that an image is associated with an ad. There can NOT exists images without an ad attached to.

Doing a pre-upload (uploading the images while you're still writing the description for example), means we will upload files without a listing' ID or info.
What we need to do is to upload the images, store them in a server's session and return the path to the client, finish the listing publishing process, link together images and listing information.

That process could go wrong in a lot of steps.
What happens if after the images uploaded the process stops? The files will be on the server for an undetermined time.
What happens if you upload some files, break the process and start again with another article? Should the old images be linked to the new listing? I don't think so, but how do you know the new ad is different from the old one (which never got published)?
A cron job should be created to clean the images that were uploaded but not linked to any ad periodically. We have to be very very sure that it only delete your images/files but not anything else.


So, it's not easy, it's a bit complicated.

Thanks

oliveiraped

  • Newbie
  • *
  • Posts: 2
Re: New upload method
« Reply #4 on: August 24, 2012, 02:51:48 pm »
Its i Bit complicated, and it needs i litle hard work.

To upload images you can use this http://kcfinder.sunhater.com/, but it need's i diferent aproach how the picture are stored in the file system. Here is one away you can do it but need's change the osclass core files.

1. every user has directory in the file system
-- user
---ad1
------pictures
--ad2
------Pictures

2. on the post-ad part, when the user clicks on insert ad, i new directory will by created has

--user
----ad-tmp
--------pictures

3. after you can use the http://kcfinder.sunhater.com/ and configure just to use that directory "user/ad-tmp/pictures"
 you can upload all the files, make resize, whatever.

4. When the user clicks on the submit form, you only need to save on the database the file system path of images "ad", and rename the "ad-tmp" to "ad-$id" - the $id will be the last inserted record id from the database.

5. View part of the ad you just need i function to read all picture inside the path of user->ad$id->pictures.

When i have time i will try to do it this aproach.

Best Regards

www.reportula.org
www.newitperson.com



 

                             

texthiller

  • Full Member
  • ***
  • Posts: 207