Jump to content

Error 404 using upload method of SC's PHP class


This topic is 4150 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a web page that allows users to upload files using normal HTTP upload.  The PHP page to process the upload uses PHP's standard move_uploaded_file() function to get the user's file into a known directory, called "docsTemp" on this system. That works. My script then calls the the upload method of SC's PHP class to move the file into the SC directory. That SC step fails with error 404 (not found).

 

The goal is to move the file from docsTemp to a nested folder inside the SC folder. The script specifies a section/subsection folder structure. SC, when used through FM web viewer, will create folders as specified by the web viewer URL. So the folder I would expect my PHP script to create would be supercontainer/section/subsection/pkID. But instead, SC is creating folders named "0","1", "2", "3"..."9" that do have the uploaded file. After 10 attempts, the SC upload cycles back to moving the files into folder 0, then 1,2,3 thru 9. 

 

Why is SC not creating folders like it does through FM web viewer?

 

 

 

 

 

 

Link to comment
Share on other sites

:laugh:The Solution to this problem turned out to be the SC Base URL, again. Our new SC installation confused me. On my  development server, running SC in standalone mode, there is always a SuperContainer folder that holds children folders "Files" and "thumbnails." On new host's server, running SC in Tomcat, we have a "supercontainer" folder which holds the individual files and no "Files" folder. On the new server, the thumbnails folder is a sibling of supercontainer folder.

 

My host said the SC url is  http://domain:port/supercontainer. It turned out that despite the lack of a Files folder, the url still needs to have that word. So the base url is http://domain:port/supercontainer/Files. 

 

I previously posted about a similar upload problem and the solution was the same. Kinda confusing... No Files folder but you still have to add "/Files" in SC_BASE_URL.

 

Gary

 

:hairy:

Link to comment
Share on other sites

This topic is 4150 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.