Live site Content Upload Issue

My form shows an error when I try to upload content to be displayed on another page. I have a code to access that page and the permission on the database is site content. Plz Help. I have never faced this issue before.

You will need to provide more information in order for us to help. Show us your code. Was this page working before? What changes have you made?

Thank you for adding this as a new post, however did you read my reply to you on the old post here?
https://www.wix.com/corvid/forum/community-discussion/everything-works-in-preview-mode-but-not-in-published-site/p-2

For datasets make sure that you are using the right mode and permissions as shown here.
https://support.wix.com/en/article/about-collection-permissions
https://support.wix.com/en/article/working-with-dataset-modes-and-collection-permissions

So don’t use site content when you are using a user input form submission…
https://support.wix.com/en/article/creating-a-form-with-user-input-elements

Also, in editor and preview you are working in sandbox mode, whereas in your published site you are working in the live mode, so you need to make sure that your datasets are synced.
https://support.wix.com/en/article/syncing-data-between-sandbox-and-live-database-collections

Also, make sure that you add the other two pics as well as they are relevant to your question.

You can find out more about the upload button here.
https://support.wix.com/en/article/adding-and-setting-up-an-upload-button

Plus, see here how to work it in code and to see the process that happens with the users uploaded item etc.
https://support.wix.com/en/article/wix-code-using-the-upload-button-with-code
https://www.wix.com/corvid/reference/$w.UploadButton.html

I am a new user of this website creating platform. The only thing i did was:

  1. Create a database (Site Content)
  2. Create the different fields
  3. Create the dataset (Read & Write) [i tried write only and still got an error]
  4. Set the Select File button as document.
  5. Set the Upload button as submit.
    And when i attempt to upload the file on the live site, error appears.
    The website is https://webbtechonline.wixsite.com/learn/upload-page
    There is a password on the page also.

When i said I’ve never had this issue before i meant that ive created the site before with a form and didn’t have the problem. Now i compare the two sites and i cannot spot the difference. This is really puzzling. I think t is something small that i am missing but i just cant figure out what it is.

I’ve changed it between the different modes for the database as well as syncing the live and the sandbox database. and i am getting the same result.

When i set the mode for the database as form submission it submits. But it is not being displayed on the uploaded data is not being displayed on the different pages.
And when i change it to Site Content it is being displayed. But the form is showing that an error had occurred

It all seems to be working for me in editor preview and live site.

how can i get you to look on it to see whats wrong. I really need help with this for schools are closed because of the virus and i think this is the best way to get information to them.

As this does not involve any code and it is just about datasets being used on the page, then it is not a code issue unfortunately.

So you be best suited going through Wix Support for more help with this, you can either send them a support ticket or speak to them directly by telephone call.

https://support.wix.com/en/article/contacting-wix-customer-care-for-support
https://support.wix.com/en/article/contacting-wix-by-phone-3491545

You can leave your Wix Editor URL here so that Wix Forum Admin and Mods can take a look at your site and see if they can see any reason why. Although they might just redirect you to Wix Support as well as it is just an issue with datasets and nothing code related on your page.

Plus, please note that only Wix employees like the Forum Admin and Mods from this forum have the permissions to view your URL link. Nobody else, including us Masters and fellow Ninjas, have the permissions to view it, so it is secure to leave here.

If you do leave your URL, then you might be able to get Yisrael to look at it for you in response to his reply from yesterday.

Also, I have just tested my mock up site with the button and dataset field changed from image to document like yours and it still works fine for me.

The only thing that was wrong was that the tables were not properly displaying the pdf icon, it is being displayed as if the icon is not being found.


See what you can upload here.
https://support.wix.com/en/article/supported-media-file-types-and-file-sizes

Guys, I am facing very peculiar problem. I have repeater with upload button. This is connected to collection. It works fine in Preview but not on live. I am getting following output of itemData
on preview (highlighted in bold the upload document)
Return: “1.00x”
Currentvaluation: “1,000,000”
email: “janardan.s@gmail.com
investorName: “Janardan Singh”
_id: “21efde5c-4a0a-4799-a0ba-aeb0a143848e”
Purchaseprice: “1”
_owner: “a8fe993e-78d3-4751-9375-e1f6bbfbc7ae”
Investmentamount: “1,000,000”
_createdDate: “Sun May 16 2021 21:45:36 GMT+0530 (India Standard Time)”
startup: “AngelBay - Loan”
noOfShares: 1000000
_updatedDate: “Tue Jun 08 2021 22:41:42 GMT+0530 (India Standard Time)”
investmentdate: “Mon Mar 15 2021 00:00:00 GMT+0530 (India Standard Time)”
Lastvaluationdate: “17/5/2021”
prisec: “Primary”
sha: “wix:document://v1/a60fc3_f9d463b33cc34d9b9246f9e9f3e38a71.pdf/AngelBay_Depositors_LOAN AGREEMENT_2100309.pdf”
currency: “INR”
Currentvaluepershare: “1”
Dateofinvestment: “14/3/2021”
purchasePrice: 1

On live (There is no field for SHA which is my upload field)
“{“Return”:“1.00x”,
“Currentvaluation”:“1,000,000”,
email":"janardan.s@gmail.com”,
“investorName”:“Janardan Singh”,
“_id”:“21efde5c-4a0a-4799-a0ba-aeb0a143848e”,
“Purchaseprice”:“1”,
“_owner”:“a8fe993e-78d3-4751-9375-e1f6bbfbc7ae”,
“Investmentamount”:“1,000,000”,
“_createdDate”:“Sun May 16 2021 21:45:36 GMT+0530 (India Standard Time)”,
“startup”:“AngelBay - Loan”,
“noOfShares”:1000000,
“_updatedDate”:“Tue Jun 08 2021 22:10:47 GMT+0530 (India Standard Time)”,
“investmentdate”:“Mon Mar 15 2021 00:00:00 GMT+0530 (India Standard Time)”,
“Lastvaluationdate”:“17/5/2021”,
“prisec”:“Primary”,
“currency”:“INR”,
“Currentvaluepershare”:“1”,
“Dateofinvestment”:“14/3/2021”,“purchasePrice”:1}”

Why it is happening so ?

 $w.onReady(function () {
$w("#repeater1").onItemReady(($item, itemData, index) => {
 
        $item("#button2").enable();
 
        $item("#button2").onClick(async (event) => {
            console.log(itemData);
            console.log(itemData.startup);
            console.log(itemData.sha);
 await $item("#dataset10").save();
            session.setItem('Errormessage', "Data Saved");
            wixWindow.openLightbox("Error")
 });
 });
})