File Not Found message

  • Posts: 29
  • Thank you received: 1
11 years 5 months ago #80539

Greetings,

I'm selling downloadable PDF documents, which are in ZIP files. When I upload a ZIP file, an underscore and random number are added to the end of the filename (capital letters are also changed to lowercase) For example, the ZIP file named ENTIRE_SERIES.zip on my hard drive becomes entire_series_1683134615.zip. Please see attached screenshot.

I've changed the filename in the upload window (shown in the screenshot) so when people download the file, the name doesn't have the long random number at the end of it. When I do, it appears to be saved successfully and the filename appears as intended on the back end product page.

But, when doing a test buy, and clicking on the download link (either in the email sent to the buyer, or the Order No. page on my website front end) I get the message "File Not Found".

If I leave the filename alone, with the _(random number) at the end, it downloads okay.

Can you please tell me how can I change the filename, to get rid of the random number, and have it still download as it should?

I hope this question is clear and makes sense. Thank you.

Attachments:
Last edit: 11 years 5 months ago by raggatt.

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 1
11 years 5 months ago #80575

Using Filezilla, I just looked in the folder media/com_hikashop/upload/safe/
There are a bunch of files in this folder, which are .pdf and .zip files uploaded as previous product drafts.
If I delete all of the files in this folder, and upload the latest drafts of my documents again so they're the only ones in this folder, will this resolve the issue?

Last edit: 11 years 5 months ago by raggatt.

Please Log in or Create an account to join the conversation.

  • Posts: 81605
  • Thank you received: 13083
  • MODERATOR
11 years 5 months ago #80588

You should delete all the files there and upload them again on the products edition page and they will have the correct name. Then, if you need to update the files, you can directly overwrite them in that folder via FTP.

The following user(s) said Thank You: raggatt

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 1
11 years 5 months ago #80621

Thanks very much for your reply.

Can you also tell me if there is a way to choose the file ID number, which is usually automatically assigned? I'd like the file ID numbers to be in consecutive order, without the big gaps in between them caused by deleted files.

Thanks again!

Please Log in or Create an account to join the conversation.

  • Posts: 26019
  • Thank you received: 4005
  • MODERATOR
11 years 5 months ago #80638

Hi,

The file number is generated in the HikaShop core, it uses a random number.
If you want to change this logical, you should edit the HikaShop core.
Modifying HikaShop core file is not really recommended because, you would loose your modification with updates (or you would not be able to update).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 1
11 years 4 months ago #80735

Thanks for your reply Jerome.

I'm not sure if I worded my question correctly. I was asking about the number shown in the attached screenshot, which is applied to each upload in consecutive order (not random). This is a different number the one I first asked about above.

Does this change your answer, regarding being able to change this File ID number?

Thanks again for your help!

Attachments:
Last edit: 11 years 4 months ago by raggatt.

Please Log in or Create an account to join the conversation.

  • Posts: 26019
  • Thank you received: 4005
  • MODERATOR
11 years 4 months ago #80763

Hi,

Ah, this one !
The "ID" number is managed by the database. You could change them using a database manager like PhpMyAdmin. But you would have to be carefull because, if you change a file_id, you would have to change all references in the database.
MySQL does not support "cascade constraints" (Foreign Keys) like MsSQL or PGSQL.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: raggatt

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 1
11 years 4 months ago #80841

Oh, too bad! But, as always, I appreciate your reply and help. Thank you very much!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum