This topic is locked
[SOLVED]

 uploaded file names, and database file string

8/21/2014 7:31:45 AM
ASPRunnerPro General questions
B
Bobs author

Can some one please help me?

I have made an application where I get users to upload pdf files.

This works a charm but the file name is changed once they have uploaded the file to the file folder.

The file string in the database is also different to the original file.
Is there a quick simple fix for this so the extra digits are not added to the original file name its so frustrating.
Thank you

Bob

mperry622 8/21/2014

What is the extra characters it is adding?
what are you using in editor to display type?

B
Bobs author 8/22/2014



What is the extra characters it is adding?
what are you using in editor to display type?



when I upload a file it uploads the file but also adds some random characters to the end of the original file name.

I don't want it to add extra characters to the file name, Looking in the database it also adds them to this.

I need the name to stay the same in both the database and the uploaded file.

admin 8/22/2014

Bob,
you need to show us what exactly is being added.

B
Bobs author 8/22/2014



Bob,
you need to show us what exactly is being added.


Ok if I upload a file named 0002135625.pdf when I look in the files folder where the file has been uploaded to the file has been renamed to 0002135625_yvn1voy5.pdf

The "_yvn1voy5" extention is not needed as I have other programes that use the original file names how can I stop asprunner from renaming the files I upload?.
Thank you

Bob

admin 8/22/2014

Got it. ASPRunnerPro modifies file name this way to prevent users from overwriting files on the server. If you don't care about overwriting files you have two options here.

  1. Implement manual file saving procedure.

    Example can be found in this article:

    http://xlinesoft.com/asprunnerpro/docs/rename_uploaded_files.htm
  2. Turn on 'Compatibility mode' that only allows to upload a single file and doesn't add anything to file name

    Open .aspr project file in any text editor, find the following line:

<m_bPre72Project>0</m_bPre72Project>


and change it to

<m_bPre72Project>1</m_bPre72Project>
B
Bobs author 8/26/2014



Got it. ASPRunnerPro modifies file name this way to prevent users from overwriting files on the server. If you don't care about overwriting files you have two options here.

  1. Implement manual file saving procedure.

    Example can be found in this article:

    http://xlinesoft.com/asprunnerpro/docs/rename_uploaded_files.htm
  2. Turn on 'Compatibility mode' that only allows to upload a single file and doesn't add anything to file name

    Open .aspr project file in any text editor, find the following line:

<m_bPre72Project>0</m_bPre72Project>


and change it to

<m_bPre72Project>1</m_bPre72Project>




Hi
Changing the following string from a 0 to 1 in the .aspr project file then recompiling it does not make any difference at all.

It still adds random characters to the file name.
<m_bPre72Project>1</m_bPre72Project>

admin 8/26/2014

Bob,
feel free to contact support directly, we'll figure out what might be wrong.

B
Bobs author 8/26/2014



Bob,
feel free to contact support directly, we'll figure out what might be wrong.


Hi Sergey
I have now opened a ticket with support.
Thank you

Bob

lefty 8/30/2014



Hi Sergey
I have now opened a ticket with support.
Thank you

Bob



. IF you don't want extra characters/integers just Check THE BOX Compatability MODE.This will give you options for your file . iF you want to rename it then use what you have been using. but if it dosent' work for you, go to comatbillithy mode

ON THE EDIT TAB click compatbillity mode and will solve your problems . Only use renaming for security issues as ( I think there is a bug on renaming files in ASPRunner ) on special filenames and mutiple uploads as I have tried this many times to no avail. Basically what happens is the file gets uploaded and an encryption with 8 characters gets added only problem is when you view your document/file it cannot find it from the database as the database name is still your original. If you use compatability mode it will work fine,

you may add a timestammp to this also another option . I would stay away from the genrateed filenames unless your using PHPrunner from the API as they have not been mastersed yet with ASPrunner and are hard to understand as new filename are being encryped which will not show up on your list page will show a circle with a black line around it. because it cannot link to that image or file . So there shuld be fix coming I think for this soon. ...????