Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Help with file upload /plesk
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

volkerc
Junior Member

Germany
156 Posts

Posted - 27 July 2020 :  20:55:33  Show Profile  Reply with Quote
And another one: I do apologize, but Persits ASPupload is not available on our Plesk hosting. Please be advised that Persits is a third party ASP module.
You would need to update the scripting of your site to use an upload function that doesn't use Persits. I do apologize for any inconvenience this might cause.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 28 July 2020 :  07:45:40  Show Profile  Visit HuwR's Homepage  Reply with Quote
You could try the original upload mod that used the file scripting object instead of persits upload, but no guarantee that this would work either.

link to upload using scripting object
https://snitzbitz.com/mods/details.asp?Version=All&mid=67


MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

volkerc
Junior Member

Germany
156 Posts

Posted - 28 July 2020 :  10:44:24  Show Profile  Reply with Quote
[quote]You could try the original upload mod that used the file scripting object instead of persits upload, but no guarantee that this would work either.

link to upload using scripting object
https://snitzbitz.com/mods/details.asp?Version=All&mid=67

[/quote=Originally posted by HuwR]thanks,
i think this allows every member to upload an image? what i ahd before, was just simply for me url i knew, to upload like a few images and when uploaded get a url shown. this sounds different,...?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 28 July 2020 :  17:28:02  Show Profile  Visit HuwR's Homepage  Reply with Quote
It would be simple to only allow say an admin to upload, but really you just need to replace the actual upload code that uses persits, I would need to see your upload file in order to show you what to change.


MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

volkerc
Junior Member

Germany
156 Posts

Posted - 28 July 2020 :  18:40:59  Show Profile  Reply with Quote
Hi Huwr,
i think this is what you would like to see,...?

[quote]'on error resume next



Server.ScriptTimeOut=10000

if request.querystring("upload") = 1 then

Set Upload = Server.CreateObject("Persits.Upload")
Upload.OverwriteFiles = False


'

savelocation = "/forum/volkerc/"
Upload.Save

' Loop through the uploaded files
thefirst = 1
For Each File in Upload.Files

File.SaveAsVirtual savelocation & File.FileName



if thefirst = 1 then
response.write "<B>DONE!</B><BR><BR>"
end if
response.write "File " & thefirst & ": <a href=""" & savelocation & File.Filename & """ target=""_blank"">" & savelocation & File.Filename & "</a><BR><BR>"
thefirst = thefirst + 1

Next


End If



%>
<table><tr>

<td align=center>


<BR><BR>


<form method="post" action="file_upload.asp?upload=1" ENCTYPE="multipart/form-data">

<b>Choose File(s):</b><BR><BR>
1: <input type="file" name="FILE1" size=65><BR><BR>
2: <input type="file" name="FILE2" size=65><BR><BR>
3: <input type="file" name="FILE3" size=65><BR><BR>
4: <input type="file" name="FILE4" size=65><BR><BR>
5: <input type="file" name="FILE5" size=65><BR><BR>
6: <input type="file" name="FILE6" size=65><BR><BR>
7: <input type="file" name="FILE7" size=65><BR><BR>
8: <input type="file" name="FILE8" size=65><BR><BR>
9: <input type="file" name="FILE9" size=65><BR><BR>
<input type="submit" class="submit" value="Upload Files">

</form>

</td></tr></table>


</body></div>
</html>
<div align="center"><footer><h1><font color="#c0c0c0"><br />
</font></h1>
<div style="text-align: center;"><font color="#c0c0c0">
</font></div>
<div style="text-align: center;"><font color="#c0c0c0"><font style="font-size: 8px;"><font style="font-size:9px;"><font style="font-size: 10px;"><br />
</font></font></font><font style="font-size: 8px;"><font style="font-size: 10px;">
</font></font></font></div>
<font style="font-size: 8px;"><font style="font-size: 10px;">
</font></font>
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 29 July 2020 :  06:34:56  Show Profile  Visit HuwR's Homepage  Reply with Quote
could you upload a copy of the file (change the .asp extension to .txt before uploading) and I will change it to use the file scripting object

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

volkerc
Junior Member

Germany
156 Posts

Posted - 29 July 2020 :  10:11:52  Show Profile  Reply with Quote
it won't let me upload .txt
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 29 July 2020 :  16:44:43  Show Profile  Visit HuwR's Homepage  Reply with Quote
oops, my bad, there was an error in the list of allowed file types, it should allow you now


MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

volkerc
Junior Member

Germany
156 Posts

Posted - 29 July 2020 :  16:50:11  Show Profile  Reply with Quote
worked now ;)

[file 1 KB]/forum/Content/Members/42443/upload.txt[/file]
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 30 July 2020 :  08:27:13  Show Profile  Visit HuwR's Homepage  Reply with Quote
thanks, I will take a look at the weekend as a bit swamped at work this week.

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

volkerc
Junior Member

Germany
156 Posts

Posted - 30 July 2020 :  10:31:35  Show Profile  Reply with Quote
Thank you!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 01 August 2020 :  06:32:52  Show Profile  Visit HuwR's Homepage  Reply with Quote
here ya go, i tested it locally and it all worked ok, but obviously no guarantees it will work for you.

[file 6 KB]/forum/Content/Members/1311/ASPUpload.zip[/file]

extract both files to the folder where you currently have your upload.asp file (it will overwrite yours and add an extra file).

let me know how you get on.

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

volkerc
Junior Member

Germany
156 Posts

Posted - 01 August 2020 :  20:30:01  Show Profile  Reply with Quote
i uploaded both files, overwritten the old one, added the extra, not working. must be doing something wrong. getting a white screen with this message: forum\volkerc does not have write permissions.
The value of your uploadsDirVar is incorrect. Open uploadTester.asp in an editor and change the value of uploadsDirVar to the pathname of a directory with write permissions.
After you correct this problem, reload the page.
this stupid plesk shows write permission....?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 01 August 2020 :  22:08:13  Show Profile  Visit HuwR's Homepage  Reply with Quote
you should be able to set the folder permissions in plesk for that folder.

https://support.plesk.com/hc/en-us/articles/213407189-How-to-manage-file-directory-permissions-via-Plesk-File-Manager#:~:text=In%20Plesk%2C%20go%20to%20Domains%20%3E%20example.com%20%3E,file%2Fdirectory%3A%20the%20Change%20Permissions%20button%20will%20be%20unavailable.

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

volkerc
Junior Member

Germany
156 Posts

Posted - 02 August 2020 :  07:52:43  Show Profile  Reply with Quote
I know where to change them, but it's different for me than all links i found, i can change permission for
Administrators
Plesk FTP subaccount
Application pool group (IWPG
Plesk Domain User
Plesk FTP subaccount (sup

It was all so easy with the old hosting :/
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.1 seconds. Powered By: Snitz Forums 2000 Version 3.4.07