He Set Up My 8-Year-Old Daughter at His Wedding… Then the Wedding CCTV Revealed Everything

He Set Up My 8-Year-Old Daughter at His Wedding… Then the Wedding CCTV Revealed Everything

The first thing I noticed wasn’t my daughter.
It was the enormous oak menu board lying across the edge of our table.
One corner had crushed Sophie’s untouched slice of vanilla cake. White frosting spread across the elegant printed menu beneath it, covering r one impossible heartbeat, the entire ballroom went silent.
More than two hundred guests sat beneath glittering crystal chandeliers inside Chicago’s Whitmore Hotel. The violinists stopped playing. A champagne glass slipped from someone’s hand and shattered against the marble floor.
Sophie stumbled backward into my arms.
She wasn’t seriously hurt, but she was shaking so hard that her small fingers could barely hold on to my sleeve.
“Mommy…”
Her voice was barely more than a whisper.
I looked up.
My brother.
Preston.
The groom.
The golden child of our family.
The man our parents had spent thirty years convincing everyone could do no wrong.
He stood beside the overturned menu stand in his flawless custom tuxedo. His fists were clenched. His jaw was tight. His face was filled with the fury of someone who had never been told no.
Then he pointed at my eight-year-old daughter and shouted loudly enough for every guest to hear.
“That’s what happens when you raise a thief!”
The silence that followed felt heavier than the board resting across our table.
I waited for my mother to rush toward her granddaughter.
She didn’t.
I waited for my father to step between Preston and us.
He didn’t.
Preston’s new bride, Lauren, wasn’t looking at Sophie. She was staring at the frosting smeared across the ivory aisle runner, as though the appearance of the ballroom mattered more than the frightened child standing only a few feet away.
Then my mother calmly walked over to Preston.
She rested one hand on his shoulder and turned toward me.
“Evelyn.”
Her voice was colder than the ballroom itself.
“Stop making a scene.”
A scene.
My brother had just terrified my daughter in front of two hundred people, and somehow I was the embarrassment.
Sophie trembled against me.
“I didn’t take it, Mommy.”
“I promise.”
Those six words changed something inside me.
Because only minutes earlier, Preston had turned his wedding reception into a public trial.
His titanium iPhone had supposedly disappeared.
He had taken the microphone from the bandleader and announced that someone in the ballroom had stolen it. Then, without questioning the groomsmen, the bridesmaids, the catering employees, or any of the guests seated near the head table, he walked directly toward us.
Sophie had spent the entire evening beside me.
She had swung her little shoes beneath her chair, picked frosting from the edge of her vanilla cake, and whispered that Lauren looked like a princess.
She had never gone near the head table.
She had never touched Preston’s phone.
Yet Preston grabbed Sophie’s small denim jacket from the back of her chair, reached into its pocket, and pulled out his missing iPhone.
The ballroom erupted.
Gasps.
Whispers.
Judgment.
My mother released a disappointed sigh.
“Oh, Evelyn…”
“What have you taught that child?”
My father lowered his head.
Not in surprise.
Not in concern.
Only in disappointment, as though this moment confirmed every unpleasant thing he had always chosen to believe about me.
Then I looked back at Preston.
For the briefest second, he smiled.
Not with relief.
Not with surprise.
With satisfaction.
It was the quiet, confident smile of a man watching his plan unfold exactly as he had intended.
Because he knew the truth.
He had placed the phone in Sophie’s pocket himself.
And he believed no one would ever prove it.
I stepped between him and my daughter.
For the first time in my life, I looked my brother directly in the eye and gave him one answer.
“No.”
His expression changed instantly.
The smile disappeared.
Thirty years of endless praise.
Thirty years of excuses.
Thirty years without consequences.
They had taught Preston one dangerous lesson.
No one ever stood up to him.
Least of all me.
He marched toward the entrance, pulled the heavy oak menu board from its stand, and struck it against the table beside us in a display of anger. The board tipped across the place settings, sending glasses and flowers sliding in every direction.
Sophie recoiled into my arms.
“Someone call hotel security!” I shouted.
No one moved.
Not my parents.
Not my relatives.
Not the guests who had just watched a grown man intimidate a little girl.
My father calmly adjusted his cuff links.
“Preston simply lost control.”
“But your daughter stole from him.”
“You brought this humiliation upon our family.”
Then my mother folded her arms.
“Take Sophie.”
“And leave.”
“For once in your life…”
“Don’t ruin your brother’s wedding.”
Something inside me became completely still.
Not shattered.
Still.
The fear disappeared.
My tears stopped.
Suddenly, everything was perfectly clear.
The crystal chandeliers.
The polished marble floor.
The overturned glasses.
My brother’s satisfied expression.
The emptiness in my parents’ eyes.
At that moment, I finally understood.
I had spent my entire life pleading with wolves to care about me simply because we carried the same last name.
But wolves did not love lambs.
They waited until the lamb had nowhere left to run.
What Preston had failed to notice was that someone else had seen every second.
Positioned silently above the ballroom doorway, a small red light continued blinking.
The hotel’s security camera.
Outside the ballroom, the sound of hurried footsteps grew closer.
I pulled Sophie more tightly against me, looked directly into my brother’s eyes, and whispered, “You really should have checked the CCTV before you accused my daughter.”
For the first time that evening, uncertainty crossed Preston’s face.
It lasted less than a second.
Then he laughed.
Not a nervous laugh.
Not yet.
It was the careless laugh of a man who still believed consequences were things that happened to other people.
“You think a hotel camera is going to save you?” he asked.
Before I could answer, the ballroom doors opened.
A tall man in a dark hotel suit entered with two security officers behind him. I recognized him as Mr. Daniel Cho, the evening operations manager who had welcomed guests at the entrance earlier.
He surveyed the overturned table, the oak board, the broken glass, and Sophie clinging to me.
Then his eyes settled on Preston.
“Mr. Whitmore,” Preston said, misidentifying him with the confident familiarity he used whenever he wanted someone to feel smaller. “This is a private family matter.”
“My name is Daniel Cho,” the manager replied evenly. “And this ballroom is under my supervision.”
Preston’s face tightened.
Daniel turned to me.
“Ma’am, are you and your daughter safe?”
Before I could answer, my mother stepped forward.
“This has been greatly exaggerated. My granddaughter was caught taking something that did not belong to her. My son became upset, but no one needs to turn this into a spectacle.”
Daniel didn’t look at her.
He kept his attention on Sophie.
“Did you take the phone?” he asked gently.
Sophie pressed closer to me.
“No.”
“Did anyone touch your jacket before the phone was found?”
She hesitated.
Preston immediately interrupted.
“She’s eight. She’s confused.”
Daniel raised one hand.
“I asked her.”
The fact that someone had finally stopped Preston from speaking over us felt almost unreal.
Sophie looked toward the head table.
“Uncle Preston picked up my jacket earlier.”
A murmur moved through the ballroom.
Preston shook his head.
“I moved it because it was hanging in the aisle.”
Sophie continued in a quiet voice.
“He said he was putting it somewhere safe.”
Preston’s confidence flickered.
My mother rushed to fill the silence.
“That proves nothing. He was helping her.”
Daniel looked toward one of the security officers.
“Please secure the ballroom doors. No one leaves until we understand what happened.”
Lauren finally reacted.
“You can’t lock my guests in here,” she said.
“No one is being detained,” Daniel replied. “We are asking everyone to remain available while we review a reported theft and a serious disturbance.”
Lauren looked at Preston.
“Reported theft?”
Her voice carried something I hadn’t heard from her all evening.
Doubt.
Preston reached for her hand, but she stepped away.
“It’s nothing,” he said. “Evelyn always turns everything into a crisis.”
There it was.
The sentence he had used since we were children.
When he broke my bicycle and told our parents I had left it in the driveway, I was dramatic.
When he forged my signature on a school form, I was dramatic.
When he emptied the savings account our grandmother had created for both of us and claimed she had changed her mind, I was jealous.
When he borrowed money from me and later denied the conversation had ever happened, I was unstable.
Our parents never asked for proof.
They asked Preston what explanation would make him comfortable.
Then they demanded that I accept it.
Daniel spoke quietly to one of the security officers, who left the ballroom.
My father stepped toward me.
“Evelyn, end this now.”
I turned to him.
“Why?”
His expression hardened.
“Because this is your brother’s wedding.”
“And Sophie is your granddaughter.”
“That doesn’t give you the right to humiliate the family.”
I almost laughed.
Not because anything was funny.
Because I had finally heard the absurdity clearly.
Preston could publicly accuse a child. He could search her clothing without permission. He could frighten her and disrupt the entire reception.
But asking for the truth was humiliation.
“Which family are you talking about?” I asked. “The one that protects children, or the one that protects Preston?”
My father’s face went pale.
My mother moved toward me.
“Lower your voice.”
“No.”
The word came more easily the second time.
Sophie looked up at me.
Something changed in her expression.
She was still frightened, but she was watching me as though she had just discovered that I could be stronger than the people who had controlled our lives.
I realized then that this moment was no longer only about Preston’s phone.
My daughter was learning what love looked like.
If I stayed silent, she would learn that love meant accepting humiliation to keep the peace.
If I apologized, she would learn that powerful people were entitled to rewrite the truth.
If I left without defending her, she might spend years wondering whether some part of me had believed the accusation.
I knelt beside her.
“I believe you,” I said.
Her eyes filled with tears.
“Completely.”
She wrapped her arms around my neck.
Behind us, Preston scoffed.
“This is pathetic.”
Daniel’s expression changed.
“Mr. Whitmore, I suggest you stop speaking until the footage has been reviewed.”
“My last name is Hale,” Preston snapped.
Daniel nodded once.
“I know.”
Preston seemed confused by the answer.
Then the security officer returned carrying a tablet.
She approached Daniel, whispered something, and handed it to him.
Daniel watched the screen without speaking.
His face remained professional, but his jaw tightened.
Preston took a step forward.
“What does it show?”
Daniel didn’t answer.
He replayed the clip.
Then he looked at Sophie.
“Would you like to wait outside with another staff member while we discuss this?”
She gripped my hand.
“I want to stay with my mom.”
“Then you may stay.”
Daniel turned the tablet around.
The image showed the ballroom approximately twenty minutes before Preston’s announcement.
The camera angle covered the corridor beside our table.
On the screen, Sophie and I were standing near the dessert display while she chose between vanilla cake and lemon tart.
Our chairs were empty.
Her denim jacket hung over the back of her seat.
Then Preston entered the frame.
Alone.
He glanced toward the ballroom.
He looked directly toward the entrance.
Then he removed something from the inside pocket of his tuxedo.
His phone.
He walked to Sophie’s chair, opened the pocket of her jacket, placed the phone inside, and returned to the head table.
The recording was perfectly clear.
No obstruction.
No confusion.
No alternative explanation.
Two hundred guests watched the groom frame an eight-year-old child at his own wedding.
No one spoke.
Preston stared at the screen.
Then he made the mistake that finally destroyed the last of his credibility.
“That footage is misleading.”
Lauren turned toward him slowly.
“Misleading?”
“The angle makes it look different.”
“It shows you putting your phone in her pocket.”
“I was keeping it safe.”
Lauren’s voice rose.
“Then why did you announce that it had been stolen?”
Preston looked around the room, searching for a friendly face.
He found our mother.
“Mom, tell them.”
She hesitated.
Only for a moment.
Then she straightened her shoulders.
“There must be an explanation.”
Daniel replayed the recording.
My mother looked away.
My father said nothing.
Preston pointed toward me.
“She forced this.”
I stared at him.
“How?”
“She’s been trying to turn everyone against me for years.”
“I barely speak to you.”
“Exactly. You’ve been resentful because Mom and Dad trust me.”
A few guests shifted uncomfortably.
His best man, a man named Carter who had laughed at every joke Preston made during dinner, quietly placed his champagne glass on the table and stepped away from the groom’s side.
Lauren removed her hand from Preston’s arm.
“Why Sophie?” she asked.
The question finally silenced him.
Not because he didn’t know the answer.
Because he hadn’t expected anyone to ask.
Lauren repeated it.
“Why did you choose a child?”
Preston’s gaze moved toward me.
There was no apology in his expression.
Only anger that the plan had failed.
“Because people believe children make mistakes,” he said. “And Evelyn always defends her. I knew she would create a scene, and then she would leave.”
The ballroom seemed to contract around us.
Lauren stared at him.
“You wanted your sister and niece removed from our wedding?”
“I wanted one evening without Evelyn making everything about herself.”
I felt Sophie’s fingers tighten around mine.
I didn’t respond.
I didn’t need to.
Preston was exposing himself more effectively than I ever could.
Lauren’s father rose from his table.
“Preston,” he said, “why were you so determined to make Evelyn leave?”
Preston’s face changed again.
This time, I recognized the emotion.
Fear.
He had not planted the phone simply because he disliked me.
There was another reason.
I thought back to the previous week.
Three days before the wedding, I had received an email from an accounting firm handling my parents’ family trust. The message had been sent to me accidentally, or perhaps by someone who had finally grown uncomfortable with what they were seeing.
The email included a request bearing my electronic signature.
It authorized a withdrawal of $185,000 from a trust created by our late grandmother.
I had never signed it.
The funds had been transferred to a company called PH Events Group.
At first, I didn’t recognize the name.
Then I searched the business registration.
P stood for Preston.
H stood for Hale.
The company had been formed six months earlier.
Its address matched Preston’s condominium.
The money had paid deposits to the florist, hotel, band, and luxury car service for the wedding.
I had called Preston immediately.
He denied everything.
Then he told me not to contact our parents until after the reception because the situation was “more complicated than it looked.”
I had planned to speak with him privately after dinner.
He had known that.
Suddenly, the entire evening made sense.
The missing phone.
The accusation.
The public humiliation.
The demand that I leave.
He had not merely wanted to embarrass me.
He wanted me removed before I could speak to Lauren or her family.
I looked at Daniel.
“Was there another camera near the hallway outside the groom’s suite?”
Preston’s head snapped toward me.
Daniel noticed.
“Yes.”
“I believe it may contain another relevant conversation.”
My mother moved quickly.
“Evelyn, stop.”
I faced her.
“Did you know about the trust withdrawal?”
She didn’t answer.
That was my answer.
My father closed his eyes.
Lauren looked between them.
“What trust withdrawal?”
Preston reached for her again.
“Not here.”
She stepped back.
“No. Here.”
Daniel asked the officer to review the hallway footage from approximately one hour before the reception.\

While we waited, Preston walked toward our parents.
He lowered his voice, but the room had become so quiet that nearly everyone heard him.
“You said she wouldn’t bring it up tonight.”
My father stared at the floor.
My mother whispered, “We thought we could convince her to wait.”
Lauren’s face lost its color.
“You all knew?”
My mother turned toward her.
“It was a temporary loan.”
“From Evelyn?”
“From the family.”
I spoke before she could continue.
“It came from a trust that requires both my authorization and Preston’s.”
Lauren looked at her new husband.
“Did you forge your sister’s approval to pay for this wedding?”
Preston’s voice sharpened.
“I was going to replace it.”
“With what?”
“My year-end bonus.”
“You told me your bonus paid the deposits.”
“It will.”
Lauren stared at him as though she were seeing a stranger wearing her husband’s face.
The security officer returned with another recording.
This clip showed the hallway outside the groom’s suite.
Preston stood with my mother near the door.
The camera did not capture every word clearly, but enough could be heard.
“She has the documents,” Preston said on the recording.
My mother replied, “Then keep her away from Lauren until tomorrow.”
“What if she talks?”
“Give everyone a reason not to trust her.”
The video continued.
Preston glanced down the hallway.
Then he said, “Sophie’s jacket is on the chair.”
My mother’s lips moved, but the next sentence was too quiet to hear.
What happened afterward required no explanation.
The footage ended.
My mother stood frozen beneath the chandeliers.
My father stared at her.
“You knew he planned to involve Sophie?”
“I didn’t know exactly what he was going to do.”
“You told him to give people a reason not to trust Evelyn.”
“I was trying to protect the wedding.”
Lauren let out a disbelieving breath.
“Protect the wedding?”
Her father walked to her side.
She removed her wedding ring.
Preston saw it and immediately changed his tone.
“Lauren, don’t overreact.”
She looked at the ring in her palm.
“You framed a child, misused family money, lied to me, and turned our reception into a public accusation because you were afraid your sister would tell the truth.”
“I made a mistake.”
“No. You made a plan.”
The distinction landed harder than any shouted accusation could have.
Preston looked toward our parents again.
This time, neither moved to defend him.
Not because they had suddenly developed courage.
Because the evidence had made denial impossible.
Daniel informed Preston that hotel security had contacted the appropriate authorities regarding the disturbance and the suspected financial misconduct. He also explained that the hotel would preserve all recordings and provide them through the proper process.
Preston’s confidence finally disappeared.
He turned to me.
“Evelyn, tell them this is a family misunderstanding.”
For thirty years, those words would have worked.
Not because I believed him.
Because I had been trained to fear what happened when I refused.
My mother would stop calling.
My father would say I was tearing the family apart.
Relatives would receive carefully edited versions of the story.
Birthdays would become tests of loyalty.
Holidays would become negotiations.
I would spend months wondering whether peace was worth one more apology for something I hadn’t done.
But Sophie was holding my hand.
And I understood that every time I surrendered to keep my place in the family, I taught her to surrender too.
“This isn’t a misunderstanding,” I said. “It’s the first time everyone has seen you clearly.”
My mother approached me.
“Evelyn, think about what this will do to us.”
I looked at her.
“I have been thinking about what all of you did to Sophie.”
“We can apologize.”
“You watched him accuse her.”
“We were confused.”
“You demanded that we leave.”
“We were trying to calm things down.”
“No. You were trying to protect Preston from consequences.”
My father finally spoke.
“We made mistakes.”
I nodded.
“Yes.”
He seemed surprised that I agreed so easily.
Then I continued.
“But admitting that only after the cameras prove it doesn’t erase what happened before.”
Sophie tugged my hand.
“Can we go home now?”
Her question cut through every remaining argument.
I knelt beside her.
“Yes.”
Daniel arranged for us to leave through a private corridor away from the guests. Before we walked out, Lauren called my name.
She was standing beside the head table, still holding the ring.
“I’m sorry,” she said.
I believed she meant it.
But I had no comfort to offer.
“You didn’t plant the phone,” I replied. “What you do after learning the truth is your decision.”
Then Sophie and I left the ballroom together.
The night outside was cool and quiet.
Chicago traffic moved along Michigan Avenue as though nothing extraordinary had happened inside the hotel.
Sophie climbed into the back seat of my car and held her denim jacket in her lap.
For several minutes, she didn’t speak.
Then she asked, “Why did Uncle Preston want everyone to think I took his phone?”
I sat beside her rather than starting the car.
“Because he was afraid people would learn about something he had done.”
“Why didn’t he just tell the truth?”
“Some people become so used to being protected that they think the truth is their enemy.”
She looked down at the jacket.
“Grandma believed him.”
The sadness in her voice hurt more than anything Preston had said.
“Grandma chose to defend him,” I replied. “That wasn’t because you did anything wrong.”
“Will she say sorry?”
“Maybe.”
“Will that make everything normal again?”
I thought carefully before answering.
“No. An apology can be the beginning of fixing something, but it doesn’t automatically make things the way they were.”
Sophie nodded slowly.
Then she leaned against me.
“I’m glad you believed me.”
I held her close.
“There was never a moment when I didn’t.”
The authorities contacted me the following morning.
By then, the wedding footage had been secured, the financial records had been requested, and Lauren had left the hotel with her parents.
The marriage certificate had not yet been submitted.
Whether she could stop the legal process was something her attorney would determine, but emotionally, the marriage had ended before the reception tables were cleared.
Over the next several weeks, the truth widened.
The trust withdrawal was not the first transaction Preston had manipulated.
There were smaller transfers.
Altered expense reports.
Payments from our parents’ business directed toward his private company.
Whenever an accountant questioned them, my father had approved the explanation because Preston assured him everything was temporary.
My mother had known enough to be concerned but had treated every warning as an attack on her favorite child.
The wedding had not created Preston’s behavior.
It had only placed it beneath bright lights and security cameras.
My parents called repeatedly.
At first, they asked me to persuade the investigators not to “destroy Preston’s future.”
Then they asked me to speak with Lauren.
Then they asked me to tell relatives that the situation had been exaggerated.
I refused every request.
Eventually, my mother left a message that sounded different.
“I’m sorry about Sophie,” she said. “I should have protected her.”
I listened twice.
Then I deleted it without responding.
Not because I wanted revenge.
Because apologies are not invitations.
Sometimes they are simply acknowledgments that arrive after the door has closed.
My father sent a letter.
He admitted that he had spent years measuring my behavior against Preston’s comfort. He wrote that he had confused keeping the family together with keeping Preston pleased.
It was the most honest thing he had ever said to me.
But honesty did not require immediate forgiveness.
I placed the letter in a drawer.
Months later, a revised trust agreement restored the missing funds and removed Preston’s access. My parents sold an investment property to cover what could not be recovered quickly.
Preston faced legal and financial consequences. The details were handled through attorneys, accountants, and formal proceedings rather than through family arguments.
For once, he could not talk his way out of the evidence.
The cameras had no favorite child.
They did not remember his trophies, his charming speeches, or the way he made our parents laugh.
They recorded what happened.
Nothing more.
Nothing less.
Lauren contacted me once.
She had moved into a small apartment near her sister and returned every wedding gift. She said the hardest part was realizing that several people had noticed warning signs before the ceremony but had remained quiet because Preston seemed successful, polished, and generous.
“I thought confidence meant character,” she told me.
“It doesn’t,” I replied.
She asked whether Sophie was doing well.
I told her the truth.
Sophie no longer wore the denim jacket.
For weeks, she checked every pocket before leaving the house.
She became nervous when adults raised their voices.
But she also began meeting with a counselor who helped her understand that someone else’s accusation could not change who she was.
One afternoon, she came home from school carrying a bright yellow certificate.
Her class had chosen her as their weekly “Integrity Star” because she had returned a bracelet another student left on the playground.
She placed the certificate on the refrigerator.
Then she looked at me and smiled.
“I knew it wasn’t mine.”
“I know,” I said.
That evening, we donated the denim jacket and bought a new one together.
She chose a purple jacket with silver buttons and enormous pockets.
At the checkout counter, she put both hands inside them and laughed.
“They’re empty.”
The sentence was simple.
But I understood what it meant.
The accusation no longer owned the pockets.
Preston no longer owned the memory.
Our family’s silence no longer owned us.
Nearly a year after the wedding, Sophie and I walked past the Whitmore Hotel on our way to a museum.
She recognized the entrance immediately.
Her steps slowed.
I asked whether she wanted to cross the street.
She looked up at the windows, then shook her head.
“No.”
We continued along the same sidewalk.
When we reached the corner, she took my hand.
“Mom?”
“Yes?”
“Did Uncle Preston know the camera was there?”
“I don’t think so.”
She considered that.
Then she smiled faintly.
“He should have checked.”
I smiled too.
Not because the memory was pleasant.
Because my daughter could finally look back at that night without seeing herself as the child who had been accused.
She saw the truth.
Preston had built his entire plan on the belief that everyone would look where he pointed.
At the phone.
At the jacket.
At me.
At the frightened little girl he thought no one would defend.
But he forgot to look above the ballroom entrance.
He forgot about the quiet red light.
He forgot that truth does not need to shout when evidence is watching.
Most of all, he forgot that the sister who had spent a lifetime lowering her eyes had finally learned to look up.
May you like
Report this article
Select a reason for reporting:
Inaccurate information Copyright violation Spam / advertisement Offensive content Other '; footer.hidden = true; overlay.hidden = false; document.body.style.overflow = 'hidden'; } function hideSection() { if (section) section.hidden = true; } function openModal() { if (alreadyReported) { showSuccess(); return; } overlay.hidden = false; document.body.style.overflow = 'hidden'; } function closeModal() { overlay.hidden = true; document.body.style.overflow = ''; footer.hidden = false; overlay.querySelectorAll('input[name="report_reason"]').forEach(function(r) { r.checked = false; }); document.getElementById('reportMessage').value = ''; errorBox.hidden = true; submitBtn.disabled = false; submitBtn.textContent = 'Submit report'; imageItems = []; imgGrid.innerHTML = ''; updateAttachBtn(); } btn.addEventListener('click', openModal); closeBtn.addEventListener('click', closeModal); cancelBtn.addEventListener('click', closeModal); overlay.addEventListener('click', function(e) { if (e.target === overlay) closeModal(); }); document.addEventListener('keydown', function(e) { if (!overlay.hidden && e.key === 'Escape') closeModal(); }); // --- Error helper --- function showError(msg) { errorBox.textContent = msg; errorBox.hidden = false; } // --- Submit --- submitBtn.addEventListener('click', function() { var selected = overlay.querySelector('input[name="report_reason"]:checked'); if (!selected) { showError('Please select a reason.'); return; } errorBox.hidden = true; submitBtn.disabled = true; var itemsToUpload = imageItems.filter(function(it) { return !it.uploadedUrl; }); if (itemsToUpload.length === 0) { doSubmit(selected.value); return; } submitBtn.textContent = 'Uploading…'; var done = 0, failed = 0; itemsToUpload.forEach(function(entry) { entry.statusEl.textContent = '…'; entry.statusEl.className = 'report-img-item__status'; entry.statusEl.hidden = false; resizeImage(entry.file, MAX_LONG_PX, function(resized) { uploadFile(resized, currentSlug, function(err, url) { done++; if (err) { failed++; entry.statusEl.textContent = 'Failed'; entry.statusEl.className = 'report-img-item__status err'; } else { entry.uploadedUrl = url; entry.statusEl.textContent = '✓'; entry.statusEl.className = 'report-img-item__status done'; } if (done === itemsToUpload.length) { if (failed > 0) { showError('Could not upload ' + failed + ' image(s). Remove the failed ones (red) or submit without them.' ); submitBtn.disabled = false; submitBtn.textContent = 'Submit report'; } else { doSubmit(selected.value); } } }); }); }); }); function doSubmit(reason) { submitBtn.textContent = 'Sending…'; var uploadedUrls = imageItems .map(function(it) { return it.uploadedUrl; }) .filter(Boolean); var payload = { reason: reason, message: document.getElementById('reportMessage').value.trim(), post_slug: currentSlug, post_url: window.location.href }; if (uploadedUrls.length) payload.image_urls = uploadedUrls; fetch('/api/post-report', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Requested-With': 'XMLHttpRequest' }, body: JSON.stringify(payload) }) .then(function(r) { return r.json(); }) .then(function(data) { if (data && data.ok) { markReported(currentSlug); alreadyReported = true; bodyEl.innerHTML = '✓ Thank you for your report.'; footer.hidden = true; setTimeout(function() { closeModal(); footer.hidden = false; hideSection(); }, 2000); } else { showError((data && data.message) ? data.message : 'Something went wrong. Please try again.'); submitBtn.disabled = false; submitBtn.textContent = 'Submit report'; } }) .catch(function() { showError('Connection failed. Please try again.'); submitBtn.disabled = false; submitBtn.textContent = 'Submit report'; }); } })();